summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/apt/apt.inc2
-rw-r--r--meta/recipes-devtools/apt/apt_0.9.9.4.bb2
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.69.bb4
-rw-r--r--meta/recipes-devtools/autogen/autogen-native_5.18.4.bb (renamed from meta/recipes-devtools/autogen/autogen-native_5.18.3.bb)4
-rw-r--r--meta/recipes-devtools/automake/automake_1.15.bb (renamed from meta/recipes-devtools/automake/automake_1.14.1.bb)4
-rw-r--r--meta/recipes-devtools/bison/bison_2.3.bb15
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch32
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch22
-rw-r--r--meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb11
-rw-r--r--meta/recipes-devtools/build-compare/build-compare_git.bb27
-rw-r--r--meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch40
-rw-r--r--meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch1599
-rw-r--r--meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb4
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb1
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc8
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch37
-rw-r--r--meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch40
-rw-r--r--meta/recipes-devtools/dmidecode/dmidecode_2.12.bb2
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch5
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb3
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc14
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch38
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch68
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch97
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch24
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch54
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.17.21.bb (renamed from meta/recipes-devtools/dpkg/dpkg_1.17.4.bb)7
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch58
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch52
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb7
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/arm_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff (renamed from meta/recipes-devtools/elfutils/elfutils/elf_additions.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/mips_backend.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch (renamed from meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch (renamed from meta/recipes-devtools/elfutils/elfutils/remove-unused.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch (renamed from meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch27
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff77
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch34
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff1756
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch256
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff)382
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch166
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch83
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff)2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch35
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff)588
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch106
-rw-r--r--meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch6
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb4
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.161.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.158.bb)31
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.bb4
-rw-r--r--meta/recipes-devtools/fdisk/gptfdisk_git.bb22
-rw-r--r--meta/recipes-devtools/file/file/debian-742262.patch4
-rw-r--r--meta/recipes-devtools/file/file/file-CVE-2014-9620-and-CVE-2014-9621.patch1414
-rw-r--r--meta/recipes-devtools/file/file_5.22.bb (renamed from meta/recipes-devtools/file/file_5.18.bb)5
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9.inc25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch138
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch36
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch148
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch75
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch32
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch49
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch15
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch55
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch (renamed from meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc3
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian.inc13
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross.inc4
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc48
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc119
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb2
-rw-r--r--meta/recipes-devtools/gcc/gcc-source.inc16
-rw-r--r--meta/recipes-devtools/gcc/gcc-target.inc9
-rw-r--r--meta/recipes-devtools/gcc/libgcc.inc7
-rw-r--r--meta/recipes-devtools/gcc/libgfortran.inc2
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.8.1.inc (renamed from meta/recipes-devtools/gdb/gdb-7.7.1.inc)5
-rw-r--r--meta/recipes-devtools/gdb/gdb-common.inc4
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian.inc2
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.1.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb-cross_7.7.1.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc4
-rw-r--r--meta/recipes-devtools/gdb/gdb/include_asm_ptrace.patch30
-rw-r--r--meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch26
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.8.1.bb (renamed from meta/recipes-devtools/gdb/gdb_7.7.1.bb)0
-rw-r--r--meta/recipes-devtools/git/git.inc17
-rw-r--r--meta/recipes-devtools/git/git_2.0.1.bb9
-rw-r--r--meta/recipes-devtools/git/git_2.3.0.bb11
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20120814.bb2
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_git.bb2
-rw-r--r--meta/recipes-devtools/guile/files/arm_aarch64.patch19
-rw-r--r--meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch (renamed from meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch)23
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.11.bb3
-rw-r--r--meta/recipes-devtools/help2man/help2man-native_1.46.4.bb (renamed from meta/recipes-devtools/help2man/help2man-native_1.46.1.bb)4
-rw-r--r--meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb4
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.12.bb (renamed from meta/recipes-devtools/json-c/json-c_0.11.bb)8
-rw-r--r--meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb2
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.6.inc (renamed from meta/recipes-devtools/libtool/libtool-2.4.2.inc)19
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb (renamed from meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb)22
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.4.6.bb (renamed from meta/recipes-devtools/libtool/libtool-native_2.4.2.bb)1
-rw-r--r--meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch39
-rw-r--r--meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch32
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch30
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch15
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/fixinstall.patch35
-rw-r--r--meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch27
-rw-r--r--meta/recipes-devtools/libtool/libtool/norm-rpath.patch8
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch121
-rw-r--r--meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch68
-rw-r--r--meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch53
-rw-r--r--meta/recipes-devtools/libtool/libtool/trailingslash.patch11
-rw-r--r--meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch179
-rw-r--r--meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch12
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.6.bb (renamed from meta/recipes-devtools/libtool/libtool_2.4.2.bb)4
-rw-r--r--meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb (renamed from meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb)2
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.17.inc2
-rw-r--r--meta/recipes-devtools/m4/m4-native_1.4.9.bb12
-rw-r--r--meta/recipes-devtools/make/make_4.1.bb (renamed from meta/recipes-devtools/make/make_4.0.bb)4
-rw-r--r--meta/recipes-devtools/makedevs/makedevs_1.0.1.bb6
-rw-r--r--meta/recipes-devtools/mkelfimage/mkelfimage_git.bb2
-rw-r--r--meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb (renamed from meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb)8
-rw-r--r--meta/recipes-devtools/mmc/mmc-utils_git.bb4
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch10
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils_git.bb20
-rw-r--r--meta/recipes-devtools/mtools/mtools_3.9.9.bb8
-rw-r--r--meta/recipes-devtools/mtools/mtools_4.0.18.bb8
-rw-r--r--meta/recipes-devtools/nasm/nasm_2.11.06.bb (renamed from meta/recipes-devtools/nasm/nasm_2.11.05.bb)4
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb2
-rw-r--r--meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb (renamed from meta/recipes-devtools/opkg/opkg-config-base_1.0.bb)5
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral.bb24
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/dest1
-rw-r--r--meta/recipes-devtools/opkg/opkg-collateral/src0
-rw-r--r--meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb48
-rw-r--r--meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch78
-rw-r--r--meta/recipes-devtools/opkg/opkg/add-exclude.patch24
-rw-r--r--meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch38
-rw-r--r--meta/recipes-devtools/opkg/opkg/no-install-recommends.patch26
-rw-r--r--meta/recipes-devtools/opkg/opkg/opkg.conf (renamed from meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments)2
-rw-r--r--meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch32
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.2.bb13
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.4.bb (renamed from meta/recipes-devtools/opkg/opkg.inc)60
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.18.bb6
-rw-r--r--meta/recipes-devtools/orc/orc_0.4.23.bb (renamed from meta/recipes-devtools/orc/orc.inc)6
-rw-r--r--meta/recipes-devtools/patch/patch.inc3
-rw-r--r--meta/recipes-devtools/patch/patch/patch-CVE-2015-1196.patch200
-rw-r--r--meta/recipes-devtools/patch/patch_2.7.1.bb1
-rw-r--r--meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb (renamed from meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb)4
-rw-r--r--meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb (renamed from meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb)8
-rw-r--r--meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb2
-rw-r--r--meta/recipes-devtools/perl/perl-native_5.20.0.bb2
-rw-r--r--meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc1
-rw-r--r--meta/recipes-devtools/perl/perl_5.20.0.bb2
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig-0.28/0001-Strip-system-library-directories-reliably.patch30
-rw-r--r--meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb1
-rw-r--r--meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb (renamed from meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb)6
-rw-r--r--meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch190
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch18
-rw-r--r--meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch264
-rw-r--r--meta/recipes-devtools/pseudo/files/shutdownping.patch53
-rw-r--r--meta/recipes-devtools/pseudo/files/symver.patch26
-rw-r--r--meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch55
-rw-r--r--meta/recipes-devtools/pseudo/pseudo-1.6.2/0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch69
-rw-r--r--meta/recipes-devtools/pseudo/pseudo-1.6.2/0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch115
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.5.1.bb20
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_1.6.4.bb (renamed from meta/recipes-devtools/pseudo/pseudo_1.6.2.bb)7
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb4
-rw-r--r--meta/recipes-devtools/python/python-2.7-manifest.inc18
-rw-r--r--meta/recipes-devtools/python/python-argparse_1.2.1.bb17
-rw-r--r--meta/recipes-devtools/python/python-distribute_0.6.32.bb8
-rw-r--r--meta/recipes-devtools/python/python-git_0.3.6.bb (renamed from meta/recipes-devtools/python/python-git_0.3.2.RC1.bb)5
-rw-r--r--meta/recipes-devtools/python/python-gitdb_0.6.4.bb (renamed from meta/recipes-devtools/python/python-gitdb_0.5.4.bb)5
-rw-r--r--meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch27
-rw-r--r--meta/recipes-devtools/python/python-native/multilib.patch104
-rw-r--r--meta/recipes-devtools/python/python-native/nohostlibs.patch49
-rw-r--r--meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch86
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.9.bb (renamed from meta/recipes-devtools/python/python-native_2.7.3.bb)34
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h30
-rw-r--r--meta/recipes-devtools/python/python-numpy/mips64n32/config.h139
-rw-r--r--meta/recipes-devtools/python/python-numpy_1.7.0.bb4
-rw-r--r--meta/recipes-devtools/python/python-pexpect_3.3.bb23
-rw-r--r--meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb (renamed from meta/recipes-devtools/python/python-pycurl_7.19.3.1.bb)11
-rw-r--r--meta/recipes-devtools/python/python-pygobject_2.28.3.bb15
-rw-r--r--meta/recipes-devtools/python/python-pygtk_2.24.0.bb2
-rw-r--r--meta/recipes-devtools/python/python-scons-native_2.3.4.bb (renamed from meta/recipes-devtools/python/python-scons-native_2.3.2.bb)0
-rw-r--r--meta/recipes-devtools/python/python-scons_2.3.4.bb (renamed from meta/recipes-devtools/python/python-scons_2.3.2.bb)4
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch37
-rw-r--r--meta/recipes-devtools/python/python-smartpm_1.4.1.bb1
-rw-r--r--meta/recipes-devtools/python/python.inc14
-rw-r--r--meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch137
-rw-r--r--meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch26
-rw-r--r--meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch17
-rw-r--r--meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch16
-rw-r--r--meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch44
-rw-r--r--meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch251
-rw-r--r--meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch27
-rw-r--r--meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch15
-rw-r--r--meta/recipes-devtools/python/python/builddir.patch27
-rw-r--r--meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch63
-rw-r--r--meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch20
-rw-r--r--meta/recipes-devtools/python/python/host_include_contamination.patch23
-rw-r--r--meta/recipes-devtools/python/python/json-flaw-fix.patch27
-rw-r--r--meta/recipes-devtools/python/python/multilib.patch205
-rw-r--r--meta/recipes-devtools/python/python/posix_close.patch43
-rw-r--r--meta/recipes-devtools/python/python/pypirc-secure.patch35
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch73
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch101
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch26
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch75
-rw-r--r--meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch1572
-rw-r--r--meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch62
-rw-r--r--meta/recipes-devtools/python/python/python2.7.3-nossl3.patch37
-rw-r--r--meta/recipes-devtools/python/python/remove_sqlite_rpath.patch19
-rw-r--r--meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch23
-rw-r--r--meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch20
-rw-r--r--meta/recipes-devtools/python/python3-native_3.3.3.bb2
-rw-r--r--meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch5
-rw-r--r--meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch7
-rw-r--r--meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch50
-rw-r--r--meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch54
-rw-r--r--meta/recipes-devtools/python/python3_3.3.3.bb12
-rw-r--r--meta/recipes-devtools/python/python_2.7.9.bb (renamed from meta/recipes-devtools/python/python_2.7.3.bb)36
-rw-r--r--meta/recipes-devtools/qemu/files/0001-Back-porting-security-fix-CVE-2014-5388.patch30
-rw-r--r--meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch10
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc15
-rw-r--r--meta/recipes-devtools/qemu/qemu/37ed3bf1ee07bb1a26adca0df8718f601f231c0b.patch59
-rw-r--r--meta/recipes-devtools/qemu/qemu/wacom.patch16
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu_2.1.0.bb)14
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb2
-rw-r--r--meta/recipes-devtools/quilt/quilt-native_0.64.bb (renamed from meta/recipes-devtools/quilt/quilt-native_0.63.bb)2
-rw-r--r--meta/recipes-devtools/quilt/quilt.inc (renamed from meta/recipes-devtools/quilt/quilt-0.63.inc)6
-rw-r--r--meta/recipes-devtools/quilt/quilt_0.64.bb (renamed from meta/recipes-devtools/quilt/quilt_0.63.bb)2
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch15
-rw-r--r--meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch14
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-realpath.patch8
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.11.2.bb4
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.14.bb1
-rw-r--r--meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch135
-rw-r--r--meta/recipes-devtools/rsync/rsync_3.1.1.bb (renamed from meta/recipes-devtools/rsync/rsync_3.1.0.bb)8
-rw-r--r--meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb2
-rw-r--r--meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch108
-rw-r--r--meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch34
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch (renamed from meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch)44
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/git-version-gen (renamed from meta/recipes-devtools/strace/strace-4.8/git-version-gen)0
-rwxr-xr-xmeta/recipes-devtools/strace/strace-4.9/run-ptest (renamed from meta/recipes-devtools/strace/strace-4.8/run-ptest)0
-rw-r--r--meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch (renamed from meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch)37
-rw-r--r--meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch25
-rw-r--r--meta/recipes-devtools/strace/strace_4.9.bb (renamed from meta/recipes-devtools/strace/strace_4.8.bb)10
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.11/disable_macos.patch (renamed from meta/recipes-devtools/subversion/subversion-1.8.9/disable_macos.patch)0
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.11/libtool2.patch (renamed from meta/recipes-devtools/subversion/subversion-1.8.9/libtool2.patch)0
-rw-r--r--meta/recipes-devtools/subversion/subversion-1.8.9/subversion-CVE-2014-3522.patch444
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.6.15.bb2
-rw-r--r--meta/recipes-devtools/subversion/subversion_1.8.11.bb (renamed from meta/recipes-devtools/subversion/subversion_1.8.9.bb)6
-rw-r--r--meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch50
-rw-r--r--meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch450
-rw-r--r--meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch87
-rw-r--r--meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch65
-rw-r--r--meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch40
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch84
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0002-linux-syslinux-implement-open_ext2_fs.patch141
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0003-linux-syslinux-implement-install_to_ext2.patch116
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch91
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0005-linux-syslinux-implement-handle_adv_on_ext.patch127
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch215
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch84
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch427
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0009-linux-syslinux-implement-install_bootblock.patch50
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch (renamed from meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch)17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch (renamed from meta/recipes-devtools/syslinux/files/syslinux-libupload-depend-lib.patch)0
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch17
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.03.bb (renamed from meta/recipes-devtools/syslinux/syslinux_6.01.bb)23
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.3.bb (renamed from meta/recipes-devtools/tcltk/tcl_8.6.1.bb)5
-rw-r--r--meta/recipes-devtools/unifdef/files/unifdef.c1005
-rw-r--r--meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb21
-rw-r--r--meta/recipes-devtools/unifdef/unifdef_2.10.bb15
-rw-r--r--meta/recipes-devtools/vala/vala.inc8
-rw-r--r--meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch (renamed from meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch)2
-rw-r--r--meta/recipes-devtools/vala/vala_0.16.0.bb8
-rw-r--r--meta/recipes-devtools/vala/vala_0.26.1.bb6
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch37
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/glibc.patch (renamed from meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch)11
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch68
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch20
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch26
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch25
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.10.1.bb (renamed from meta/recipes-devtools/valgrind/valgrind_3.9.0.bb)19
-rw-r--r--meta/recipes-devtools/xmlto/xmlto-0.0.25/obsolete_automake_macros.patch12
-rw-r--r--meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch (renamed from meta/recipes-devtools/xmlto/xmlto-0.0.25/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch)0
-rw-r--r--meta/recipes-devtools/xmlto/xmlto_0.0.26.bb (renamed from meta/recipes-devtools/xmlto/xmlto_0.0.25.bb)6
312 files changed, 7473 insertions, 11402 deletions
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index 378021a327..321934b97d 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20130726T154545Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.gz \
file://no-ko-translation.patch \
file://use-host.patch \
file://makerace.patch \
diff --git a/meta/recipes-devtools/apt/apt_0.9.9.4.bb b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
index 86ffe66ca4..77cbff1c0c 100644
--- a/meta/recipes-devtools/apt/apt_0.9.9.4.bb
+++ b/meta/recipes-devtools/apt/apt_0.9.9.4.bb
@@ -1,5 +1,5 @@
DEPENDS = "curl db"
-RDEPENDS_${PN} = "dpkg bash"
+RDEPENDS_${PN} = "dpkg bash debianutils"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
require apt.inc
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index 6614a7b780..809007f35d 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -2,8 +2,6 @@ require autoconf.inc
PR = "r11"
-PARALLEL_MAKE = ""
-
LICENSE = "GPLv2 & GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504"
@@ -22,6 +20,6 @@ SRC_URI[sha256sum] = "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd
SRC_URI_append_class-native = " file://fix_path_xtra.patch"
-EXTRA_OECONF += "ac_cv_path_M4=m4"
+EXTRA_OECONF += "ac_cv_path_M4=m4 ac_cv_prog_TEST_EMACS=no"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
index abc0a42102..302ba79f77 100644
--- a/meta/recipes-devtools/autogen/autogen-native_5.18.3.bb
+++ b/meta/recipes-devtools/autogen/autogen-native_5.18.4.bb
@@ -13,8 +13,8 @@ SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
file://increase-timeout-limit.patch \
file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch"
-SRC_URI[md5sum] = "0fb6b003423e004d94e0119c2390078f"
-SRC_URI[sha256sum] = "73d05a689105eb9b8be54f32498c99ddbd360776fc61cf45be6a2a4eb4a40039"
+SRC_URI[md5sum] = "6f48029cc839303d28496e1609868938"
+SRC_URI[sha256sum] = "3cd9f81a8ae7c6865bb9bbbe16c4307a243a1373d0b315a83571cbba1fff725d"
DEPENDS = "guile-native libtool-native libxml2-native"
diff --git a/meta/recipes-devtools/automake/automake_1.14.1.bb b/meta/recipes-devtools/automake/automake_1.15.bb
index be73d19cf6..d5b6e9eba4 100644
--- a/meta/recipes-devtools/automake/automake_1.14.1.bb
+++ b/meta/recipes-devtools/automake/automake_1.15.bb
@@ -22,8 +22,8 @@ SRC_URI += " file://python-libdir.patch \
file://py-compile-compile-only-optimized-byte-code.patch \
file://buildtest.patch"
-SRC_URI[md5sum] = "d052a3e884631b9c7892f2efce542d75"
-SRC_URI[sha256sum] = "814c2333f350ce00034a1fe718e0e4239998ceea7b0aff67e9fd273ed6dfc23b"
+SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
+SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
do_install_append () {
install -d ${D}${datadir}
diff --git a/meta/recipes-devtools/bison/bison_2.3.bb b/meta/recipes-devtools/bison/bison_2.3.bb
index 174916bcb1..182e8802b2 100644
--- a/meta/recipes-devtools/bison/bison_2.3.bb
+++ b/meta/recipes-devtools/bison/bison_2.3.bb
@@ -11,17 +11,12 @@ DEPENDS = "bison-native flex-native"
PR = "r1"
-BASE_SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
+SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.gz \
file://bison-2.3_m4.patch"
-SRC_URI = "${BASE_SRC_URI}"
-
SRC_URI[md5sum] = "22327efdd5080e2b1acb6e560a04b43a"
SRC_URI[sha256sum] = "52f78aa4761a74ceb7fdf770f3554dd84308c3b93c4255e3a5c17558ecda293e"
-DEPENDS_class-native = "gettext-native"
-SRC_URI_class-native = "${BASE_SRC_URI}"
-
inherit autotools gettext texinfo
acpaths = "-I ${S}/m4"
@@ -29,11 +24,3 @@ do_configure_prepend () {
rm -f ${S}/m4/*gl.m4
cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
}
-
-do_install_append_class-native() {
- create_wrapper ${D}/${bindir}/bison \
- M4=${STAGING_BINDIR_NATIVE}/m4 \
- BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
-}
-#bison-native encodes the staging M4 path
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch
new file mode 100644
index 0000000000..65c31a4448
--- /dev/null
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-parallel.patch
@@ -0,0 +1,32 @@
+From 373eb51328b5e10529763cad441210e6b0efb24e Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 11 Feb 2015 22:08:41 -0800
+Subject: [PATCH] Makefile: fix for parallel build
+
+Fixed:
+mkfs.c:300:46: error: 'BTRFS_BUILD_VERSION' undeclared (first use in this function)
+ fprintf(stderr, "mkfs.btrfs, part of %s\n", BTRFS_BUILD_VERSION);
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 9c69ada..30c6f06 100644
+--- a/Makefile
++++ b/Makefile
+@@ -118,7 +118,7 @@ else
+ AM_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ endif
+
+-%.o.d: %.c
++%.o.d: %.c version.h
+ $(Q)$(CC) -MM -MG -MF $@ -MT $(@:.o.d=.o) -MT $(@:.o.d=.static.o) -MT $@ $(AM_CFLAGS) $(CFLAGS) $<
+
+ .c.o:
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
deleted file mode 100644
index 6df4e10a19..0000000000
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/nodocs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Doc generation requires xmlto and ascidoc which we don't have right now.
-Disable doc generation until such times as we have the right dependencies.
-
-RP 2014/7/16
-
-Upstream-Status: Inappropriate
-
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile 2014-07-16 13:21:43.289386655 +0000
-+++ git/Makefile 2014-07-16 13:42:46.453421079 +0000
-@@ -57,8 +57,8 @@
- btrfs_fragment_libs = -lgd -lpng -ljpeg -lfreetype
-
- SUBDIRS =
--BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS)) build-Documentation
--INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS)) install-Documentation
-+BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
-+INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
- CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
-
- .PHONY: $(SUBDIRS)
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
index 0eed13bfb1..d86075c4c6 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
@@ -12,13 +12,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
SECTION = "base"
DEPENDS = "util-linux attr e2fsprogs lzo acl"
-SRCREV = "24cf4d8c3ee924b474f68514e0167cc2e602a48d"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git \
- file://nodocs.patch"
+SRCREV = "344599a7aefe23c7169ccdde3ad1b921bb60024c"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+ file://fix-parallel.patch \
+"
+
S = "${WORKDIR}/git"
-PV = "3.14.2+git${SRCPV}"
+PV = "3.18.2+git${SRCPV}"
+EXTRA_OEMAKE += "DISABLE_DOCUMENTATION=1"
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb
new file mode 100644
index 0000000000..418aee0d5e
--- /dev/null
+++ b/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Build Result Compare Script"
+DESCRIPTION = "This package contains scripts to find out if the build result\
+differs to a former build."
+HOMEPAGE = "https://github.com/openSUSE/build-compare"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "git://github.com/openSUSE/build-compare.git"
+SRC_URI += "file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1"
+SRC_URI += "file://Ignore-DWARF-sections.patch;striplevel=1"
+PATCHTOOL = "git"
+
+SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND += "native nativesdk"
+
+do_install() {
+ install -d ${D}/${bindir}
+ install -m 755 functions.sh ${D}/${bindir}
+ install -m 755 pkg-diff.sh ${D}/${bindir}
+ install -m 755 same-build-result.sh ${D}/${bindir}
+ install -m 755 srpm-check.sh ${D}/${bindir}
+}
+
+RDEPENDS_${PN} += "bash"
diff --git a/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch b/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
new file mode 100644
index 0000000000..7dda1acbf2
--- /dev/null
+++ b/meta/recipes-devtools/build-compare/files/Ignore-DWARF-sections.patch
@@ -0,0 +1,40 @@
+From 015715694eadd714b903f30ade876e0738d44974 Mon Sep 17 00:00:00 2001
+From: Randy Witt <randy.e.witt@linux.intel.com>
+Date: Mon, 5 Jan 2015 15:09:20 -0800
+Subject: [PATCH] Ignore DWARF sections.
+
+Assume for now that we don't care about the DWARF sections due to path
+differences. However, in the case the tool is ran on a "debug" package
+it will most likely falsely say the packages have no differences.
+
+Upstream-Status: Inappropriate [other]
+
+The package difference tool is correctly labelling the packages as different
+when the DWARF sections don't match due to paths. The paths in the debug info
+should actually be made to be the same using compile flags or some other
+mechanism.
+
+However, to make the tool more useful to Yocto until the work can be done
+to ensure identical paths in debug sections, this patch is being applied.
+
+Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
+---
+ pkg-diff.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkg-diff.sh b/pkg-diff.sh
+index 56035c1..0f1fa76 100755
+--- a/pkg-diff.sh
++++ b/pkg-diff.sh
+@@ -658,7 +658,7 @@ check_single_file()
+ echo "" >$file1
+ echo "" >$file2
+ # Don't compare .build-id and .gnu_debuglink sections
+- sections="$(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr "\n" " ")"
++ sections="$(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" -e "\.debug_abbrev" -e "\.debug_aranges" -e "\.debug_frame" -e "\.debug_info" -e "\.debug_line" -e "\.debug_loc" -e "\.debug_macinfo" -e "\.debug_pubnames" -e "\.debug_pubtypes" -e "\.debug_ranges" -e "\.debug_str" | tr "\n" " ")"
+ for section in $sections; do
+ objdump -s -j $section old/$file | sed "s,^old/,," > $file1
+ objdump -s -j $section new/$file | sed "s,^new/,," > $file2
+--
+1.9.3
+
diff --git a/meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch b/meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch
new file mode 100644
index 0000000000..cff3a9e236
--- /dev/null
+++ b/meta/recipes-devtools/build-compare/files/Rename-rpm-check.sh-to-pkg-diff.sh.patch
@@ -0,0 +1,1599 @@
+From 4de3df5a1b361cd09a081f0e0bdb94cbf684ed48 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Feb 2015 00:34:47 -0800
+Subject: [PATCH] Rename rpm-check.sh to pkg-diff.sh.
+
+The tool now accepts package input other than rpm, so change the name
+which could be misleading.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pulls]
+
+Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
+
+Updated for rpm-check.sh.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ build-compare.spec | 2 +-
+ pkg-diff.sh | 765 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ rpm-check.sh | 764 -------------------------------------------------
+ same-build-result.sh | 4 +-
+ 4 files changed, 768 insertions(+), 767 deletions(-)
+ create mode 100644 pkg-diff.sh
+ delete mode 100755 rpm-check.sh
+
+diff --git a/build-compare.spec b/build-compare.spec
+index 14a97e9..5f47ca1 100644
+--- a/build-compare.spec
++++ b/build-compare.spec
+@@ -25,7 +25,7 @@ Version: 2015.02.10
+ Release: 0
+ Source1: COPYING
+ Source2: same-build-result.sh
+-Source3: rpm-check.sh
++Source3: pkg-diff.sh
+ Source4: functions.sh
+ Source5: srpm-check.sh
+ BuildRoot: %{_tmppath}/%{name}-%{version}-build
+diff --git a/pkg-diff.sh b/pkg-diff.sh
+new file mode 100644
+index 0000000..56035c1
+--- /dev/null
++++ b/pkg-diff.sh
+@@ -0,0 +1,765 @@
++#! /bin/bash
++#
++# Copyright (c) 2009, 2010, 2011, 2012 SUSE Linux Product GmbH, Germany.
++# Licensed under GPL v2, see COPYING file for details.
++#
++# Written by Michael Matz and Stephan Coolo
++# Enhanced by Andreas Jaeger
++
++FUNCTIONS=${0%/*}/functions.sh
++
++check_all=
++case $1 in
++ -a | --check-all)
++ check_all=1
++ shift
++esac
++
++if test "$#" != 2; then
++ echo "usage: $0 [-a|--check-all] old.rpm new.rpm"
++ exit 1
++fi
++
++self_script=$(cd $(dirname $0); echo $(pwd)/$(basename $0))
++
++source $FUNCTIONS
++
++oldpkg=`readlink -f $1`
++newpkg=`readlink -f $2`
++rename_script=`mktemp`
++
++if test ! -f "$oldpkg"; then
++ echo "can't open $1"
++ exit 1
++fi
++
++if test ! -f "$newpkg"; then
++ echo "can't open $2"
++ exit 1
++fi
++
++#usage unjar <file>
++function unjar()
++{
++ local file
++ file=$1
++
++ if [[ $(type -p fastjar) ]]; then
++ UNJAR=fastjar
++ elif [[ $(type -p jar) ]]; then
++ UNJAR=jar
++ elif [[ $(type -p unzip) ]]; then
++ UNJAR=unzip
++ else
++ echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
++ exit 1
++ fi
++
++ case $UNJAR in
++ jar|fastjar)
++ # echo jar -xf $file
++ ${UNJAR} -xf $file
++ ;;
++ unzip)
++ unzip -oqq $file
++ ;;
++ esac
++}
++
++# list files in directory
++#usage unjar_l <file>
++function unjar_l()
++{
++ local file
++ file=$1
++
++ if [[ $(type -p fastjar) ]]; then
++ UNJAR=fastjar
++ elif [[ $(type -p jar) ]]; then
++ UNJAR=jar
++ elif [[ $(type -p unzip) ]]; then
++ UNJAR=unzip
++ else
++ echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
++ exit 1
++ fi
++
++ case $UNJAR in
++ jar|fastjar)
++ ${UNJAR} -tf $file
++ ;;
++ unzip)
++ unzip -l $file
++ ;;
++ esac
++}
++
++filter_disasm()
++{
++ sed -e 's/^ *[0-9a-f]\+://' -e 's/\$0x[0-9a-f]\+/$something/' -e 's/callq *[0-9a-f]\+/callq /' -e 's/# *[0-9a-f]\+/# /' -e 's/\(0x\)\?[0-9a-f]\+(/offset(/' -e 's/[0-9a-f]\+ </</' -e 's/^<\(.*\)>:/\1:/' -e 's/<\(.*\)+0x[0-9a-f]\+>/<\1 + ofs>/'
++}
++
++echo "Comparing `basename $oldpkg` to `basename $newpkg`"
++
++case $oldpkg in
++ *.rpm)
++ cmp_spec $rename_script $oldpkg $newpkg
++ RES=$?
++ case $RES in
++ 0)
++ echo "RPM meta information is identical"
++ if test -z "$check_all"; then
++ exit 0
++ fi
++ ;;
++ 1)
++ echo "RPM meta information is different"
++ if test -z "$check_all"; then
++ exit 1
++ fi
++ ;;
++ 2)
++ echo "RPM file checksum differs."
++ RES=0
++ ;;
++ *)
++ echo "Wrong exit code!"
++ exit 1
++ ;;
++ esac
++ ;;
++esac
++
++file1=`mktemp`
++file2=`mktemp`
++
++dir=`mktemp -d`
++echo "Extracting packages"
++unpackage $oldpkg $dir/old
++unpackage $newpkg $dir/new
++
++# files is set in cmp_spec for rpms, so if RES is empty we should assume
++# it wasn't an rpm and pick all files for comparison.
++if [ -z $RES ]; then
++ oldfiles=`cd $dir/old; find . -type f`
++ newfiles=`cd $dir/new; find . -type f`
++
++ files=`echo -e "$oldfiles\n$newfiles" | sort -u`
++fi
++
++cd $dir
++bash $rename_script
++
++dfile=`mktemp`
++
++diff_two_files()
++{
++ if ! cmp -s old/$file new/$file; then
++ echo "$file differs ($ftype)"
++ hexdump -C old/$file > $file1
++ hexdump -C new/$file > $file2
++ diff -u $file1 $file2 | head -n 200
++ return 1
++ fi
++ return 0
++}
++
++trim_man_first_line()
++{
++ # Handles the first line if it is like:
++ #.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
++ #.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
++ local f=$1
++ sed -i -e '1{
++ s|^\.\\"[[:blank:]]\+Automatically[[:blank:]]generated[[:blank:]]by[[:blank:]]Pod::Man[[:blank:]].*|.\\" Overly verbose Pod::Man|
++ s|^\.\\"[[:blank:]]\+DO[[:blank:]]NOT[[:blank:]]MODIFY[[:blank:]]THIS[[:blank:]]FILE![[:blank:]]\+It[[:blank:]]was[[:blank:]]generated[[:blank:]]by[[:blank:]]help2man[[:blank:]].*|.\\" Overly verbose help2man|
++ }' $f
++}
++
++trim_man_TH()
++{
++ # Handles lines like:
++ # .TH debhelper 7 "2010-02-27" "7.4.15" "Debhelper"
++ # .TH DIRMNGR-CLIENT 1 2010-02-27 "Dirmngr 1.0.3" "GNU Privacy Guard"
++ # .TH ccmake 1 "March 06, 2010" "ccmake 2.8.1-rc3"
++ # .TH QEMU-IMG 1 "2010-03-14" " " " "
++ # .TH kdecmake 1 "May 07, 2010" "cmake 2.8.1"
++ # .TH "appender.h" 3 "12 May 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
++ # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
++ # .TH "OFFLINEIMAP" "1" "11 May 2010" "John Goerzen" "OfflineIMAP Manual"
++ # .TH gv 3guile "13 May 2010"
++ #.TH "GIT\-ARCHIMPORT" "1" "09/13/2010" "Git 1\&.7\&.1" "Git Manual"
++ # .TH LDIRECTORD 8 "2010-10-20" "perl v5.12.2" "User Contributed Perl Documentation"
++ # .TH ccmake 1 "February 05, 2012" "ccmake 2.8.7"
++ # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
++ # .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands"
++ # .TH "GCM-CALIBRATE" "1" "03 February 2012" "" ""
++ #.TH Locale::Po4a::Xml.pm 3pm "2015-01-30" "Po4a Tools" "Po4a Tools"
++ local f=$1
++ # (.TH quoted section) (quoted_date)(*)
++ sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "qq2000-01-01"\3|' $f
++ # (.TH unquoted section) (quoted_date)(*)
++ sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "uq2000-02-02"\3|' $f
++ # (.TH quoted section) (unquoted_date)(*)
++ sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 qu2000-03-03\3|' $f
++ # (.TH unquoted section) (unquoted_date)(*)
++ sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 uu2000-04-04\3|' $f
++}
++
++strip_numbered_anchors()
++{
++ # Remove numbered anchors on Docbook / HTML files.
++ # This should be save since we remove them from old and new files.
++ # A trailing </a> or </div> tag will stay also on both files.
++ for f in old/$file new/$file; do
++ sed -i -e 's%<[ ]*a[ ]\+name[^<]*[0-9]\+[^<]*%%g' \
++ -e 's%<[ ]*a[ ]\+href[^<]*#[^<]*[0-9]\+[^<]*%%g' \
++ -e 's%<[^<]*id="ftn\.[^<]*[0-9]\+[^<]*%%g' $f
++ done
++}
++
++
++check_compressed_file()
++{
++ local file=$1
++ local ext=$2
++ local tmpdir=`mktemp -d`
++ local ftype
++ local ret=0
++ echo "$ext file with odd filename: $file"
++ if test -n "$tmpdir"; then
++ mkdir $tmpdir/{old,new}
++ cp --parents --dereference old/$file $tmpdir/
++ cp --parents --dereference new/$file $tmpdir/
++ if pushd $tmpdir > /dev/null ; then
++ case "$ext" in
++ bz2)
++ mv old/$file{,.bz2}
++ mv new/$file{,.bz2}
++ bzip2 -d old/$file.bz2
++ bzip2 -d new/$file.bz2
++ ;;
++ gzip)
++ mv old/$file{,.gz}
++ mv new/$file{,.gz}
++ gzip -d old/$file.gz
++ gzip -d new/$file.gz
++ ;;
++ xz)
++ mv old/$file{,.xz}
++ mv new/$file{,.xz}
++ xz -d old/$file.xz
++ xz -d new/$file.xz
++ ;;
++ esac
++ ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
++ case $ftype in
++ POSIX\ tar\ archive)
++ echo "$ext content is: $ftype"
++ mv old/$file{,.tar}
++ mv new/$file{,.tar}
++ if ! check_single_file ${file}.tar; then
++ ret=1
++ fi
++ ;;
++ ASCII\ cpio\ archive\ *)
++ echo "$ext content is: $ftype"
++ mv old/$file{,.cpio}
++ mv new/$file{,.cpio}
++ if ! check_single_file ${file}.cpio; then
++ ret=1
++ fi
++ ;;
++ *)
++ echo "unhandled $ext content: $ftype"
++ if ! diff_two_files; then
++ ret=1
++ fi
++ ;;
++ esac
++ popd > /dev/null
++ fi
++ rm -rf "$tmpdir"
++ fi
++ return $ret
++}
++
++check_single_file()
++{
++ local file="$1"
++ case $file in
++ *.spec)
++ sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file
++ sed -i -e "s,Release:.*$release2,Release: @RELEASE@," new/$file
++ ;;
++ *.exe.mdb|*.dll.mdb)
++ # Just debug information, we can skip them
++ echo "$file skipped as debug file."
++ return 0
++ ;;
++ *.a)
++ flist=`ar t new/$file`
++ pwd=$PWD
++ fdir=`dirname $file`
++ cd old/$fdir
++ ar x `basename $file`
++ cd $pwd/new/$fdir
++ ar x `basename $file`
++ cd $pwd
++ for f in $flist; do
++ if ! check_single_file $fdir/$f; then
++ return 1
++ fi
++ done
++ return 0
++ ;;
++ *.cpio)
++ flist=`cpio --quiet --list --force-local < "new/$file"`
++ pwd=$PWD
++ fdir=$file.extract.$PPID.$$
++ mkdir old/$fdir new/$fdir
++ cd old/$fdir
++ cpio --quiet --extract --force-local < "../${file##*/}"
++ cd $pwd/new/$fdir
++ cpio --quiet --extract --force-local < "../${file##*/}"
++ cd $pwd
++ local ret=0
++ for f in $flist; do
++ if ! check_single_file $fdir/$f; then
++ ret=1
++ if test -z "$check_all"; then
++ break
++ fi
++ fi
++ done
++ rm -rf old/$fdir new/$fdir
++ return $ret
++ ;;
++ *.tar|*.tar.bz2|*.tar.gz|*.tgz|*.tbz2)
++ flist=`tar tf new/$file`
++ pwd=$PWD
++ fdir=`dirname $file`
++ cd old/$fdir
++ tar xf `basename $file`
++ cd $pwd/new/$fdir
++ tar xf `basename $file`
++ cd $pwd
++ local ret=0
++ for f in $flist; do
++ if ! check_single_file $fdir/$f; then
++ ret=1
++ if test -z "$check_all"; then
++ break
++ fi
++ fi
++ done
++ return $ret
++ ;;
++ *.zip|*.jar|*.war)
++ cd old
++ unjar_l ./$file |sort > flist
++ # 10-05-2010 14:39
++ sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ," flist
++ # 2012-02-03 07:59
++ sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
++ cd ../new
++ unjar_l ./$file |sort> flist
++ sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ,; " flist
++ sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
++ cd ..
++ if ! cmp -s old/flist new/flist; then
++ echo "$file has different file list"
++ diff -u old/flist new/flist
++ return 1
++ fi
++ flist=`grep date new/flist | sed -e 's,.* date ,,'`
++ pwd=$PWD
++ fdir=`dirname $file`
++ cd old/$fdir
++ unjar `basename $file`
++ cd $pwd/new/$fdir
++ unjar `basename $file`
++ cd $pwd
++ local ret=0
++ for f in $flist; do
++ if test -f new/$fdir/$f && ! check_single_file $fdir/$f; then
++ ret=1
++ if test -z "$check_all"; then
++ break
++ fi
++ fi
++ done
++ return $ret;;
++ *.pyc|*.pyo)
++ perl -e "open fh, '+<', 'old/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
++ perl -e "open fh, '+<', 'new/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
++ ;;
++ *.bz2)
++ bunzip2 -c old/$file > old/${file/.bz2/}
++ bunzip2 -c new/$file > new/${file/.bz2/}
++ check_single_file ${file/.bz2/}
++ return $?
++ ;;
++ *.gz)
++ gunzip -c old/$file > old/${file/.gz/}
++ gunzip -c new/$file > new/${file/.gz/}
++ check_single_file ${file/.gz/}
++ return $?
++ ;;
++ *.rpm)
++ $self_script -a old/$file new/$file
++ return $?
++ ;;
++ *png)
++ # Try to remove timestamps, only if convert from ImageMagick is installed
++ if [[ $(type -p convert) ]]; then
++ convert old/$file +set date:create +set date:modify old/${file/.png/_n.png}
++ convert old/$file +set date:create +set date:modify new/${file/.png/_n.png}
++ if ! cmp -s old/${file/.png/_n.png} new/${file/.png/_n.png}; then
++ echo "$file differs ($ftype)"
++ hexdump -C old/${file/.png/_n.png} > $file1
++ hexdump -C new/${file/.png/_n.png} > $file2
++ diff -u $file1 $file2 | head -n 20
++ return 1
++ fi
++ return 0
++ fi
++ ;;
++ /usr/share/locale/*/LC_MESSAGES/*.mo|/usr/share/locale-bundle/*/LC_MESSAGES/*.mo)
++ for f in old/$file new/$file; do
++ sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," $f
++ done
++ ;;
++ /usr/share/doc/packages/*/*.html|\
++ /usr/share/doc/kde/HTML/*/*/*.html|/usr/share/doc/*/html/*.html)
++ for f in old/$file new/$file; do
++ # texi2html output, e.g. in kvm, indent, qemu
++ sed -i -e "s|^<!-- Created on .*, 20.. by texi2html .\...|<!-- Created on August 7, 2009 by texi2html 1.82|" $f
++ sed -i -e 's|^ *This document was generated by <em>Autobuild</em> on <em>.*, 20..</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html .\...</em></a>.$| This document was generated by <em>Autobuild</em> on <em>August 7, 2009</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.|' $f
++ # doxygen docu, e.g. in libssh and log4c
++ sed -i -e 's|Generated on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] 20[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f
++ # Generated on Sat Aug 14 2010 16:49:48 for libssh
++ sed -i -e 's|Generated on ... ... [0-9]* 20[0-9][0-9] [0-9]*:[0-9][0-9]:[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f
++ done
++ strip_numbered_anchors
++ ;;
++ /usr/share/javadoc/*.html |\
++ /usr/share/javadoc/*/*.html|/usr/share/javadoc/*/*/*.html)
++ strip_numbered_anchors
++ # There are more timestamps in html, so far we handle only some primitive versions.
++ for f in old/$file new/$file; do
++ # Javadoc:
++ # <head>
++ # <!-- Generated by javadoc (version 1.7.0_75) on Tue Feb 03 02:20:12 GMT 2015 -->
++ # <!-- Generated by javadoc on Tue Feb 03 00:02:48 GMT 2015 -->
++ # <meta name="date" content="2015-02-03">
++ # </head>
++ sed -i -e '
++ /^<head>/{
++ : next
++ n
++ /^<\/head>/{
++ b end_head
++ }
++ s/^\(<!-- Generated by javadoc\) \((\(build\|version\) [0-9._]\+) on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \5/
++ t next
++ s/^\(<!-- Generated by javadoc\) \(on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \3/
++ t next
++ s/^<meta name="date" content="[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}">/<meta name="date" content="some-date-removed-by-build-compare">/
++ b next
++ }
++ : end_head
++ ' $f
++ # Gjdoc HtmlDoclet:
++ sed -i -e 's%Generated by Gjdoc HtmlDoclet [0-9,.]*, part of <a href="http://www.gnu.org/software/classpath/cp-tools/" title="" target="_top">GNU Classpath Tools</a>, on .*, 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.%Generated by Gjdoc.%' $f
++ sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\(.*\)GNU Classpath Tools</a>, on [A-Z][a-z]* [0-9]*, 20?? [0-9]*:??:?? \(a|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\1GNU Classpath Tools</a>, on January 1, 2009 0:00:00 a.m. GMT.</p>%' $f
++ sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\(.*GNU Classpath Tools</a>\), on [a-zA-Z]* [0-9][0-9], 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\1,on May 1, 2010 1:11:42 p.m. GMT.</p>%' $f
++ # deprecated-list is randomly ordered, sort it for comparison
++ case $f in
++ */deprecated-list.html)
++ sort -o $f $f
++ ;;
++ esac
++ done
++ ;;
++ /usr/share/javadoc/gjdoc.properties |\
++ /usr/share/javadoc/*/gjdoc.properties)
++ for f in old/$file new/$file; do
++ sed -i -e 's|^#[A-Z][a-z]\{2\} [A-Z][a-z]\{2\} [0-9]\{2\} ..:..:.. GMT 20..$|#Fri Jan 01 11:27:36 GMT 2009|' $f
++ done
++ ;;
++ */fonts.scale|*/fonts.dir|*/encodings.dir)
++ for f in old/$file new/$file; do
++ # sort files before comparing
++ sort -o $f $f
++ done
++ ;;
++ /var/adm/perl-modules/*)
++ for f in old/$file new/$file; do
++ sed -i -e 's|^=head2 ... ... .. ..:..:.. ....: C<Module>|=head2 Wed Jul 1 00:00:00 2009: C<Module>|' $f
++ done
++ ;;
++ /usr/share/man/man3/*3pm)
++ for f in old/$file new/$file; do
++ sed -i -e 's| 3 "20..-..-.." "perl v5....." "User Contributed Perl Documentation"$| 3 "2009-01-01" "perl v5.10.0" "User Contributed Perl Documentation"|' $f
++ trim_man_TH $f
++ trim_man_first_line $f
++ done
++ ;;
++ /usr/share/man/*/man*|/usr/share/man/man*|/usr/lib/texmf/doc/man/*/*)
++
++ for f in old/$file new/$file; do
++ trim_man_TH $f
++ trim_man_first_line $f
++ # generated by docbook xml:
++ #.\" Date: 09/13/2010
++ sed -i -e 's|Date: [0-1][0-9]/[0-9][0-9]/201[0-9]|Date: 09/13/2010|' $f
++ done
++ ;;
++ *.elc)
++ # emacs lisp files
++ for f in old/$file new/$file; do
++ sed -i -e 's|Compiled by abuild@.* on ... ... .. ..:..:.. 20..$|compiled by abuild@buildhost on Wed Jul 01 00:00:00 2009|' $f
++ done
++ ;;
++ /var/lib/texmf/web2c/*/*fmt |\
++ /var/lib/texmf/web2c/metafont/*.base|\
++ /var/lib/texmf/web2c/metapost/*.mem)
++ # binary dump of TeX and Metafont formats, we can ignore them for good
++ echo "difference in $file ignored."
++ return 0
++ ;;
++ */libtool)
++ for f in old/$file new/$file; do
++ sed -i -e 's|^# Libtool was configured on host [A-Za-z0-9]*:$|# Libtool was configured on host x42:|' $f
++ done
++ ;;
++ /etc/mail/*cf|/etc/sendmail.cf)
++ # from sendmail package
++ for f in old/$file new/$file; do
++ # - ##### built by abuild@build33 on Thu May 6 11:21:17 UTC 2010
++ sed -i -e 's|built by abuild@[a-z0-9]* on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] .* 20[0-9][0-9]|built by abuild@build42 on Thu May 6 11:21:17 UTC 2010|' $f
++ done
++ ;;
++ /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\
++ /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2)
++ # various kde and gtk packages
++ strip_numbered_anchors
++ ;;
++ */created.rid)
++ # ruby documentation
++ # file just contains a timestamp and nothing else, so ignore it
++ echo "Ignore $file"
++ return 0
++ ;;
++ */rdoc/files/*.html)
++ # ruby documentation
++ # <td>Mon Sep 20 19:02:43 +0000 2010</td>
++ for f in old/$file new/$file; do
++ sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f
++ done
++ strip_numbered_anchors
++ ;;
++ */Linux*Env.Set.sh)
++ # LibreOffice files, contains:
++ # Generated on: Mon Apr 18 13:19:22 UTC 2011
++ for f in old/$file new/$file; do
++ sed -i -e 's%^# Generated on:.*UTC 201[0-9] *$%# Generated on: Sometime%g' $f
++ done
++ ;;
++ /usr/lib/libreoffice/solver/inc/*/deliver.log)
++ # LibreOffice log file
++ echo "Ignore $file"
++ return 0
++ ;;
++ /var/adm/update-messages/*|/var/adm/update-scripts/*)
++ # encode version-release inside
++ oldfn=`echo "$file"|sed -e s/-$release2/-$release1/;`
++
++ # fetchmsttfonts embeds the release number in the update shell script.
++ echo sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
++ sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
++
++ if ! diff -u old/$oldfn new/$file; then
++ echo "$oldfn is not same as $file"
++ return 1
++ fi
++ echo "$file and $oldfn are same"
++ return 0
++ ;;
++ *.ps)
++ for f in "old/$file" "new/$file"; do
++ sed -i -e '
++ /^%%CreationDate:[[:blank:]]/d
++ /^%%Creator:[[:blank:]]groff[[:blank:]]version[[:blank:]]/d
++ /^%DVIPSSource:[[:blank:]]/d
++ ' "$f"
++ done
++ ;;
++ *pdf)
++ # PDF files contain a unique ID, remove it
++ # Format of the ID is:
++ # /ID [<9ACE247A70CF9BEAFEE15E116259BD6D> <9ACE247A70CF9BEAFEE15E116259BD6D>]
++ # with optional spaces. pdftex creates also:
++ # /CreationDate (D:20120103083206Z)
++ # /ModDate (D:20120103083206Z)
++ # and possibly XML metadata as well
++ for f in "old/$file" "new/$file"; do
++ sed -i \
++ '/obj/,/endobj/{
++ s%/ID \?\[ \?<[^>]\+> \?<[^>]\+> \?\]%/IDrandom%g;
++ s%/CreationDate \?(D:[^)]*)%/CreationDate (D: XXX)%g;
++ s%/ModDate \?(D:[^)]*)%/ModDate (D: XXX)%g;
++ s%<pdf:CreationDate>[^<]*</pdf:CreationDate>%<pdf:CreationDate>XXX</pdf:CreationDate>%g;
++ s%<pdf:ModDate>[^<]*</pdf:ModDate>%<pdf:ModDate>XXX</pdf:ModDate>%g;
++ s%<xap:CreateDate>[^<]*</xap:CreateDate>%<xap:CreateDate>XXX</xap:CreateDate>%g;
++ s%<xap:ModifyDate>[^<]*</xap:ModifyDate>%<xap:ModifyDate>XXX</xap:ModifyDate>%g;
++ s%<xap:MetadataDate>[^<]*</xap:MetadataDate>%<xap:MetadataDate>XXX</xap:MetadataDate>%g;
++ }' "$f"
++ done
++ ;;
++ esac
++
++ ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
++ case $ftype in
++ PE32\ executable*Mono\/\.Net\ assembly*)
++ echo "PE32 Mono/.Net assembly: $file"
++ if [ -x /usr/bin/monodis ] ; then
++ monodis old/$file 2>/dev/null|sed -e 's/GUID = {.*}/GUID = { 42 }/;'> ${file1}
++ monodis new/$file 2>/dev/null|sed -e 's/GUID = {.*}/GUID = { 42 }/;'> ${file2}
++ if ! cmp -s ${file1} ${file2}; then
++ echo "$file differs ($ftype)"
++ diff -u ${file1} ${file2}
++ return 1
++ fi
++ else
++ echo "Cannot compare, no monodis installed"
++ return 1
++ fi
++ ;;
++ ELF*executable*|ELF*[LM]SB\ shared\ object*)
++ objdump -d --no-show-raw-insn old/$file | filter_disasm > $file1
++ if ! test -s $file1; then
++ # objdump has no idea how to handle it
++ if ! diff_two_files; then
++ ret=1
++ break
++ fi
++ fi
++ elfdiff=
++ sed -i -e "s,old/,," $file1
++ objdump -d --no-show-raw-insn new/$file | filter_disasm > $file2
++ sed -i -e "s,new/,," $file2
++ if ! diff -u $file1 $file2 > $dfile; then
++ echo "$file differs in assembler output"
++ head -n 200 $dfile
++ elfdiff="1"
++ fi
++ echo "" >$file1
++ echo "" >$file2
++ # Don't compare .build-id and .gnu_debuglink sections
++ sections="$(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr "\n" " ")"
++ for section in $sections; do
++ objdump -s -j $section old/$file | sed "s,^old/,," > $file1
++ objdump -s -j $section new/$file | sed "s,^new/,," > $file2
++ if ! diff -u $file1 $file2 > $dfile; then
++ echo "$file differs in ELF section $section"
++ head -n 200 $dfile
++ elfdiff="1"
++ fi
++ done
++ if test -z "$elfdiff"; then
++ echo "$file: only difference was in build-id or gnu_debuglink, GOOD."
++ return 0
++ fi
++ return 1
++ ;;
++ *ASCII*|*text*)
++ if ! cmp -s old/$file new/$file; then
++ echo "$file differs ($ftype)"
++ diff -u old/$file new/$file | head -n 200
++ return 1
++ fi
++ ;;
++ directory|setuid,\ directory|sticky,\ directory)
++ # tar might package directories - ignore them here
++ return 0
++ ;;
++ bzip2\ compressed\ data*)
++ if ! check_compressed_file "$file" "bz2"; then
++ return 1
++ fi
++ ;;
++ gzip\ compressed\ data*)
++ if ! check_compressed_file "$file" "gzip"; then
++ return 1
++ fi
++ ;;
++ XZ\ compressed\ data*)
++ if ! check_compressed_file "$file" "xz"; then
++ return 1
++ fi
++ ;;
++ POSIX\ tar\ archive)
++ mv old/$file{,.tar}
++ mv new/$file{,.tar}
++ if ! check_single_file ${file}.tar; then
++ return 1
++ fi
++ ;;
++ cpio\ archive)
++ mv old/$file{,.cpio}
++ mv new/$file{,.cpio}
++ if ! check_single_file ${file}.cpio; then
++ return 1
++ fi
++ ;;
++ symbolic\ link\ to\ *)
++ readlink "old/$file" > $file1
++ readlink "new/$file" > $file2
++ if ! diff -u $file1 $file2; then
++ echo "symlink target for $file differs"
++ return 1
++ fi
++ ;;
++ *)
++ if ! diff_two_files; then
++ return 1
++ fi
++ ;;
++ esac
++ return 0
++}
++
++# We need /proc mounted for some tests, so check that it's mounted and
++# complain if not.
++PROC_MOUNTED=0
++if [ ! -d /proc/self/ ]; then
++ echo "/proc is not mounted"
++ mount -orw -n -tproc none /proc
++ PROC_MOUNTED=1
++fi
++
++# preserve cmp_spec result for check_all runs
++ret=$RES
++for file in $files; do
++ if ! check_single_file $file; then
++ ret=1
++ if test -z "$check_all"; then
++ break
++ fi
++ fi
++done
++
++if [ "$PROC_MOUNTED" -eq "1" ]; then
++ echo "Unmounting proc"
++ umount /proc
++fi
++
++rm $file1 $file2 $dfile $rename_script
++rm -rf $dir
++if test "$ret" = 0; then
++ echo "Package content is identical"
++fi
++exit $ret
++# vim: tw=666 ts=2 et
+diff --git a/rpm-check.sh b/rpm-check.sh
+deleted file mode 100755
+index dd47642..0000000
+--- a/rpm-check.sh
++++ /dev/null
+@@ -1,764 +0,0 @@
+-#! /bin/bash
+-#
+-# Copyright (c) 2009, 2010, 2011, 2012 SUSE Linux Product GmbH, Germany.
+-# Licensed under GPL v2, see COPYING file for details.
+-#
+-# Written by Michael Matz and Stephan Coolo
+-# Enhanced by Andreas Jaeger
+-
+-FUNCTIONS=${0%/*}/functions.sh
+-
+-check_all=
+-case $1 in
+- -a | --check-all)
+- check_all=1
+- shift
+-esac
+-
+-if test "$#" != 2; then
+- echo "usage: $0 [-a|--check-all] old.rpm new.rpm"
+- exit 1
+-fi
+-
+-self_script=$(cd $(dirname $0); echo $(pwd)/$(basename $0))
+-
+-source $FUNCTIONS
+-
+-oldpkg=`readlink -f $1`
+-newpkg=`readlink -f $2`
+-rename_script=`mktemp`
+-
+-if test ! -f "$oldpkg"; then
+- echo "can't open $1"
+- exit 1
+-fi
+-
+-if test ! -f "$newpkg"; then
+- echo "can't open $2"
+- exit 1
+-fi
+-
+-#usage unjar <file>
+-function unjar()
+-{
+- local file
+- file=$1
+-
+- if [[ $(type -p fastjar) ]]; then
+- UNJAR=fastjar
+- elif [[ $(type -p jar) ]]; then
+- UNJAR=jar
+- elif [[ $(type -p unzip) ]]; then
+- UNJAR=unzip
+- else
+- echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
+- exit 1
+- fi
+-
+- case $UNJAR in
+- jar|fastjar)
+- # echo jar -xf $file
+- ${UNJAR} -xf $file
+- ;;
+- unzip)
+- unzip -oqq $file
+- ;;
+- esac
+-}
+-
+-# list files in directory
+-#usage unjar_l <file>
+-function unjar_l()
+-{
+- local file
+- file=$1
+-
+- if [[ $(type -p fastjar) ]]; then
+- UNJAR=fastjar
+- elif [[ $(type -p jar) ]]; then
+- UNJAR=jar
+- elif [[ $(type -p unzip) ]]; then
+- UNJAR=unzip
+- else
+- echo "ERROR: jar, fastjar, or unzip is not installed (trying file $file)"
+- exit 1
+- fi
+-
+- case $UNJAR in
+- jar|fastjar)
+- ${UNJAR} -tf $file
+- ;;
+- unzip)
+- unzip -l $file
+- ;;
+- esac
+-}
+-
+-filter_disasm()
+-{
+- sed -e 's/^ *[0-9a-f]\+://' -e 's/\$0x[0-9a-f]\+/$something/' -e 's/callq *[0-9a-f]\+/callq /' -e 's/# *[0-9a-f]\+/# /' -e 's/\(0x\)\?[0-9a-f]\+(/offset(/' -e 's/[0-9a-f]\+ </</' -e 's/^<\(.*\)>:/\1:/' -e 's/<\(.*\)+0x[0-9a-f]\+>/<\1 + ofs>/'
+-}
+-
+-echo "Comparing `basename $oldpkg` to `basename $newpkg`"
+-
+-case $oldpkg in
+- *.rpm)
+- cmp_spec $rename_script $oldpkg $newpkg
+- RES=$?
+- case $RES in
+- 0)
+- echo "RPM meta information is identical"
+- if test -z "$check_all"; then
+- exit 0
+- fi
+- ;;
+- 1)
+- echo "RPM meta information is different"
+- if test -z "$check_all"; then
+- exit 1
+- fi
+- ;;
+- 2)
+- echo "RPM file checksum differs."
+- RES=0
+- ;;
+- *)
+- echo "Wrong exit code!"
+- exit 1
+- ;;
+- esac
+- ;;
+-esac
+-
+-file1=`mktemp`
+-file2=`mktemp`
+-
+-dir=`mktemp -d`
+-echo "Extracting packages"
+-unpackage $oldpkg $dir/old
+-unpackage $newpkg $dir/new
+-
+-# files is set in cmp_spec for rpms, so if RES is empty we should assume
+-# it wasn't an rpm and pick all files for comparison.
+-if [ -z $RES ]; then
+- oldfiles=`cd $dir/old; find . -type f`
+- newfiles=`cd $dir/new; find . -type f`
+-
+- files=`echo -e "$oldfiles\n$newfiles" | sort -u`
+-fi
+-
+-cd $dir
+-bash $rename_script
+-
+-dfile=`mktemp`
+-
+-diff_two_files()
+-{
+- if ! cmp -s old/$file new/$file; then
+- echo "$file differs ($ftype)"
+- hexdump -C old/$file > $file1
+- hexdump -C new/$file > $file2
+- diff -u $file1 $file2 | head -n 200
+- return 1
+- fi
+- return 0
+-}
+-
+-trim_man_first_line()
+-{
+- # Handles the first line if it is like:
+- #.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
+- #.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
+- local f=$1
+- sed -i -e '1{
+- s|^\.\\"[[:blank:]]\+Automatically[[:blank:]]generated[[:blank:]]by[[:blank:]]Pod::Man[[:blank:]].*|.\\" Overly verbose Pod::Man|
+- s|^\.\\"[[:blank:]]\+DO[[:blank:]]NOT[[:blank:]]MODIFY[[:blank:]]THIS[[:blank:]]FILE![[:blank:]]\+It[[:blank:]]was[[:blank:]]generated[[:blank:]]by[[:blank:]]help2man[[:blank:]].*|.\\" Overly verbose help2man|
+- }' $f
+-}
+-
+-trim_man_TH()
+-{
+- # Handles lines like:
+- # .TH debhelper 7 "2010-02-27" "7.4.15" "Debhelper"
+- # .TH DIRMNGR-CLIENT 1 2010-02-27 "Dirmngr 1.0.3" "GNU Privacy Guard"
+- # .TH ccmake 1 "March 06, 2010" "ccmake 2.8.1-rc3"
+- # .TH QEMU-IMG 1 "2010-03-14" " " " "
+- # .TH kdecmake 1 "May 07, 2010" "cmake 2.8.1"
+- # .TH "appender.h" 3 "12 May 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
+- # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
+- # .TH "OFFLINEIMAP" "1" "11 May 2010" "John Goerzen" "OfflineIMAP Manual"
+- # .TH gv 3guile "13 May 2010"
+- #.TH "GIT\-ARCHIMPORT" "1" "09/13/2010" "Git 1\&.7\&.1" "Git Manual"
+- # .TH LDIRECTORD 8 "2010-10-20" "perl v5.12.2" "User Contributed Perl Documentation"
+- # .TH ccmake 1 "February 05, 2012" "ccmake 2.8.7"
+- # .TH "appender.h" 3 "Tue Aug 31 2010" "Version 1.2.1" "log4c" \" -*- nroff -*-
+- # .TH ARCH "1" "September 2010" "GNU coreutils 8.5" "User Commands"
+- # .TH "GCM-CALIBRATE" "1" "03 February 2012" "" ""
+- #.TH Locale::Po4a::Xml.pm 3pm "2015-01-30" "Po4a Tools" "Po4a Tools"
+- local f=$1
+- # (.TH quoted section) (quoted_date)(*)
+- sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "qq2000-01-01"\3|' $f
+- # (.TH unquoted section) (quoted_date)(*)
+- sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\("[^"]\+"\)\([[:blank:]]\+.*\)\?|\1 "uq2000-02-02"\3|' $f
+- # (.TH quoted section) (unquoted_date)(*)
+- sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+"[^"]\+"[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 qu2000-03-03\3|' $f
+- # (.TH unquoted section) (unquoted_date)(*)
+- sed -i -e 's|^\([[:blank:]]*\.TH[[:blank:]]\+[^"][^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+\)[[:blank:]]\+\([^"][^[:blank:]]\+\)\([[:blank:]]\+.*\)\?|\1 uu2000-04-04\3|' $f
+-}
+-
+-strip_numbered_anchors()
+-{
+- # Remove numbered anchors on Docbook / HTML files.
+- # This should be save since we remove them from old and new files.
+- # A trailing </a> or </div> tag will stay also on both files.
+- for f in old/$file new/$file; do
+- sed -i -e 's%<[ ]*a[ ]\+name[^<]*[0-9]\+[^<]*%%g' \
+- -e 's%<[ ]*a[ ]\+href[^<]*#[^<]*[0-9]\+[^<]*%%g' \
+- -e 's%<[^<]*id="ftn\.[^<]*[0-9]\+[^<]*%%g' $f
+- done
+-}
+-
+-
+-check_compressed_file()
+-{
+- local file=$1
+- local ext=$2
+- local tmpdir=`mktemp -d`
+- local ftype
+- local ret=0
+- echo "$ext file with odd filename: $file"
+- if test -n "$tmpdir"; then
+- mkdir $tmpdir/{old,new}
+- cp --parents --dereference old/$file $tmpdir/
+- cp --parents --dereference new/$file $tmpdir/
+- if pushd $tmpdir > /dev/null ; then
+- case "$ext" in
+- bz2)
+- mv old/$file{,.bz2}
+- mv new/$file{,.bz2}
+- bzip2 -d old/$file.bz2
+- bzip2 -d new/$file.bz2
+- ;;
+- gzip)
+- mv old/$file{,.gz}
+- mv new/$file{,.gz}
+- gzip -d old/$file.gz
+- gzip -d new/$file.gz
+- ;;
+- xz)
+- mv old/$file{,.xz}
+- mv new/$file{,.xz}
+- xz -d old/$file.xz
+- xz -d new/$file.xz
+- ;;
+- esac
+- ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
+- case $ftype in
+- POSIX\ tar\ archive)
+- echo "$ext content is: $ftype"
+- mv old/$file{,.tar}
+- mv new/$file{,.tar}
+- if ! check_single_file ${file}.tar; then
+- ret=1
+- fi
+- ;;
+- ASCII\ cpio\ archive\ *)
+- echo "$ext content is: $ftype"
+- mv old/$file{,.cpio}
+- mv new/$file{,.cpio}
+- if ! check_single_file ${file}.cpio; then
+- ret=1
+- fi
+- ;;
+- *)
+- echo "unhandled $ext content: $ftype"
+- if ! diff_two_files; then
+- ret=1
+- fi
+- ;;
+- esac
+- popd > /dev/null
+- fi
+- rm -rf "$tmpdir"
+- fi
+- return $ret
+-}
+-
+-check_single_file()
+-{
+- local file="$1"
+- case $file in
+- *.spec)
+- sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file
+- sed -i -e "s,Release:.*$release2,Release: @RELEASE@," new/$file
+- ;;
+- *.exe.mdb|*.dll.mdb)
+- # Just debug information, we can skip them
+- echo "$file skipped as debug file."
+- return 0
+- ;;
+- *.a)
+- flist=`ar t new/$file`
+- pwd=$PWD
+- fdir=`dirname $file`
+- cd old/$fdir
+- ar x `basename $file`
+- cd $pwd/new/$fdir
+- ar x `basename $file`
+- cd $pwd
+- for f in $flist; do
+- if ! check_single_file $fdir/$f; then
+- return 1
+- fi
+- done
+- return 0
+- ;;
+- *.cpio)
+- flist=`cpio --quiet --list --force-local < "new/$file"`
+- pwd=$PWD
+- fdir=$file.extract.$PPID.$$
+- mkdir old/$fdir new/$fdir
+- cd old/$fdir
+- cpio --quiet --extract --force-local < "../${file##*/}"
+- cd $pwd/new/$fdir
+- cpio --quiet --extract --force-local < "../${file##*/}"
+- cd $pwd
+- local ret=0
+- for f in $flist; do
+- if ! check_single_file $fdir/$f; then
+- ret=1
+- if test -z "$check_all"; then
+- break
+- fi
+- fi
+- done
+- rm -rf old/$fdir new/$fdir
+- return $ret
+- ;;
+- *.tar|*.tar.bz2|*.tar.gz|*.tgz|*.tbz2)
+- flist=`tar tf new/$file`
+- pwd=$PWD
+- fdir=`dirname $file`
+- cd old/$fdir
+- tar xf `basename $file`
+- cd $pwd/new/$fdir
+- tar xf `basename $file`
+- cd $pwd
+- local ret=0
+- for f in $flist; do
+- if ! check_single_file $fdir/$f; then
+- ret=1
+- if test -z "$check_all"; then
+- break
+- fi
+- fi
+- done
+- return $ret
+- ;;
+- *.zip|*.jar|*.war)
+- cd old
+- unjar_l ./$file |sort > flist
+- # 10-05-2010 14:39
+- sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ," flist
+- # 2012-02-03 07:59
+- sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
+- cd ../new
+- unjar_l ./$file |sort> flist
+- sed -i -e "s, [0-9][0-9]-[0-9][0-9]-[0-9]\+ [0-9][0-9]:[0-9][0-9] , date ,; " flist
+- sed -i -e "s, 20[0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] , date ," flist
+- cd ..
+- if ! cmp -s old/flist new/flist; then
+- echo "$file has different file list"
+- diff -u old/flist new/flist
+- return 1
+- fi
+- flist=`grep date new/flist | sed -e 's,.* date ,,'`
+- pwd=$PWD
+- fdir=`dirname $file`
+- cd old/$fdir
+- unjar `basename $file`
+- cd $pwd/new/$fdir
+- unjar `basename $file`
+- cd $pwd
+- local ret=0
+- for f in $flist; do
+- if test -f new/$fdir/$f && ! check_single_file $fdir/$f; then
+- ret=1
+- if test -z "$check_all"; then
+- break
+- fi
+- fi
+- done
+- return $ret;;
+- *.pyc|*.pyo)
+- perl -e "open fh, '+<', 'old/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
+- perl -e "open fh, '+<', 'new/$file'; seek fh, 4, SEEK_SET; print fh '0000';"
+- ;;
+- *.bz2)
+- bunzip2 -c old/$file > old/${file/.bz2/}
+- bunzip2 -c new/$file > new/${file/.bz2/}
+- check_single_file ${file/.bz2/}
+- return $?
+- ;;
+- *.gz)
+- gunzip -c old/$file > old/${file/.gz/}
+- gunzip -c new/$file > new/${file/.gz/}
+- check_single_file ${file/.gz/}
+- return $?
+- ;;
+- *.rpm)
+- $self_script -a old/$file new/$file
+- return $?
+- ;;
+- *png)
+- # Try to remove timestamps, only if convert from ImageMagick is installed
+- if [[ $(type -p convert) ]]; then
+- convert old/$file +set date:create +set date:modify old/${file/.png/_n.png}
+- convert old/$file +set date:create +set date:modify new/${file/.png/_n.png}
+- if ! cmp -s old/${file/.png/_n.png} new/${file/.png/_n.png}; then
+- echo "$file differs ($ftype)"
+- hexdump -C old/${file/.png/_n.png} > $file1
+- hexdump -C new/${file/.png/_n.png} > $file2
+- diff -u $file1 $file2 | head -n 20
+- return 1
+- fi
+- return 0
+- fi
+- ;;
+- /usr/share/locale/*/LC_MESSAGES/*.mo|/usr/share/locale-bundle/*/LC_MESSAGES/*.mo)
+- for f in old/$file new/$file; do
+- sed -i -e "s,POT-Creation-Date: ....-..-.. ..:..+....,POT-Creation-Date: 1970-01-01 00:00+0000," $f
+- done
+- ;;
+- /usr/share/doc/packages/*/*.html|\
+- /usr/share/doc/kde/HTML/*/*/*.html|/usr/share/doc/*/html/*.html)
+- for f in old/$file new/$file; do
+- # texi2html output, e.g. in kvm, indent, qemu
+- sed -i -e "s|^<!-- Created on .*, 20.. by texi2html .\...|<!-- Created on August 7, 2009 by texi2html 1.82|" $f
+- sed -i -e 's|^ *This document was generated by <em>Autobuild</em> on <em>.*, 20..</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html .\...</em></a>.$| This document was generated by <em>Autobuild</em> on <em>August 7, 2009</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.|' $f
+- # doxygen docu, e.g. in libssh and log4c
+- sed -i -e 's|Generated on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] 20[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f
+- # Generated on Sat Aug 14 2010 16:49:48 for libssh
+- sed -i -e 's|Generated on ... ... [0-9]* 20[0-9][0-9] [0-9]*:[0-9][0-9]:[0-9][0-9] for |Generated on Mon May 10 20:45:00 2010 for |' $f
+- done
+- strip_numbered_anchors
+- ;;
+- /usr/share/javadoc/*.html |\
+- /usr/share/javadoc/*/*.html|/usr/share/javadoc/*/*/*.html)
+- strip_numbered_anchors
+- # There are more timestamps in html, so far we handle only some primitive versions.
+- for f in old/$file new/$file; do
+- # Javadoc:
+- # <head>
+- # <!-- Generated by javadoc (version 1.7.0_75) on Tue Feb 03 02:20:12 GMT 2015 -->
+- # <!-- Generated by javadoc on Tue Feb 03 00:02:48 GMT 2015 -->
+- # <meta name="date" content="2015-02-03">
+- # </head>
+- sed -i -e '
+- /^<head>/{
+- : next
+- n
+- /^<\/head>/{
+- b end_head
+- }
+- s/^\(<!-- Generated by javadoc\) \((\(build\|version\) [0-9._]\+) on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \5/
+- t next
+- s/^\(<!-- Generated by javadoc\) \(on ... ... .. ..:..:.. \(GMT\|UTC\) ....\) \(-->\)/\1 some-date-removed-by-build-compare \3/
+- t next
+- s/^<meta name="date" content="[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}">/<meta name="date" content="some-date-removed-by-build-compare">/
+- b next
+- }
+- : end_head
+- ' $f
+- # Gjdoc HtmlDoclet:
+- sed -i -e 's%Generated by Gjdoc HtmlDoclet [0-9,.]*, part of <a href="http://www.gnu.org/software/classpath/cp-tools/" title="" target="_top">GNU Classpath Tools</a>, on .*, 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.%Generated by Gjdoc.%' $f
+- sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\(.*\)GNU Classpath Tools</a>, on [A-Z][a-z]* [0-9]*, 20?? [0-9]*:??:?? \(a|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN"\1GNU Classpath Tools</a>, on January 1, 2009 0:00:00 a.m. GMT.</p>%' $f
+- sed -i -e 's%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\(.*GNU Classpath Tools</a>\), on [a-zA-Z]* [0-9][0-9], 20.. [0-9]*:..:.. \(a\|p\)\.m\. GMT.</p>%<!DOCTYPE html PUBLIC "-//gnu.org///DTD\1,on May 1, 2010 1:11:42 p.m. GMT.</p>%' $f
+- # deprecated-list is randomly ordered, sort it for comparison
+- case $f in
+- */deprecated-list.html)
+- sort -o $f $f
+- ;;
+- esac
+- done
+- ;;
+- /usr/share/javadoc/gjdoc.properties |\
+- /usr/share/javadoc/*/gjdoc.properties)
+- for f in old/$file new/$file; do
+- sed -i -e 's|^#[A-Z][a-z]\{2\} [A-Z][a-z]\{2\} [0-9]\{2\} ..:..:.. GMT 20..$|#Fri Jan 01 11:27:36 GMT 2009|' $f
+- done
+- ;;
+- */fonts.scale|*/fonts.dir|*/encodings.dir)
+- for f in old/$file new/$file; do
+- # sort files before comparing
+- sort -o $f $f
+- done
+- ;;
+- /var/adm/perl-modules/*)
+- for f in old/$file new/$file; do
+- sed -i -e 's|^=head2 ... ... .. ..:..:.. ....: C<Module>|=head2 Wed Jul 1 00:00:00 2009: C<Module>|' $f
+- done
+- ;;
+- /usr/share/man/man3/*3pm)
+- for f in old/$file new/$file; do
+- sed -i -e 's| 3 "20..-..-.." "perl v5....." "User Contributed Perl Documentation"$| 3 "2009-01-01" "perl v5.10.0" "User Contributed Perl Documentation"|' $f
+- trim_man_TH $f
+- trim_man_first_line $f
+- done
+- ;;
+- /usr/share/man/*/man*|/usr/share/man/man*|/usr/lib/texmf/doc/man/*/*)
+-
+- for f in old/$file new/$file; do
+- trim_man_TH $f
+- trim_man_first_line $f
+- # generated by docbook xml:
+- #.\" Date: 09/13/2010
+- sed -i -e 's|Date: [0-1][0-9]/[0-9][0-9]/201[0-9]|Date: 09/13/2010|' $f
+- done
+- ;;
+- *.elc)
+- # emacs lisp files
+- for f in old/$file new/$file; do
+- sed -i -e 's|Compiled by abuild@.* on ... ... .. ..:..:.. 20..$|compiled by abuild@buildhost on Wed Jul 01 00:00:00 2009|' $f
+- done
+- ;;
+- /var/lib/texmf/web2c/*/*fmt |\
+- /var/lib/texmf/web2c/metafont/*.base|\
+- /var/lib/texmf/web2c/metapost/*.mem)
+- # binary dump of TeX and Metafont formats, we can ignore them for good
+- echo "difference in $file ignored."
+- return 0
+- ;;
+- */libtool)
+- for f in old/$file new/$file; do
+- sed -i -e 's|^# Libtool was configured on host [A-Za-z0-9]*:$|# Libtool was configured on host x42:|' $f
+- done
+- ;;
+- /etc/mail/*cf|/etc/sendmail.cf)
+- # from sendmail package
+- for f in old/$file new/$file; do
+- # - ##### built by abuild@build33 on Thu May 6 11:21:17 UTC 2010
+- sed -i -e 's|built by abuild@[a-z0-9]* on ... ... [0-9]* [0-9]*:[0-9][0-9]:[0-9][0-9] .* 20[0-9][0-9]|built by abuild@build42 on Thu May 6 11:21:17 UTC 2010|' $f
+- done
+- ;;
+- /usr/share/doc/kde/HTML/*/*/index.cache|/usr/share/doc/kde/HTML/*/*/*/index.cache|\
+- /usr/share/gtk-doc/html/*/*.html|/usr/share/gtk-doc/html/*/*.devhelp2)
+- # various kde and gtk packages
+- strip_numbered_anchors
+- ;;
+- */created.rid)
+- # ruby documentation
+- # file just contains a timestamp and nothing else, so ignore it
+- echo "Ignore $file"
+- return 0
+- ;;
+- */rdoc/files/*.html)
+- # ruby documentation
+- # <td>Mon Sep 20 19:02:43 +0000 2010</td>
+- for f in old/$file new/$file; do
+- sed -i -e 's%<td>[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+ +0000 201[0-9]</td>%<td>Mon Sep 20 19:02:43 +0000 2010</td>%g' $f
+- done
+- strip_numbered_anchors
+- ;;
+- */Linux*Env.Set.sh)
+- # LibreOffice files, contains:
+- # Generated on: Mon Apr 18 13:19:22 UTC 2011
+- for f in old/$file new/$file; do
+- sed -i -e 's%^# Generated on:.*UTC 201[0-9] *$%# Generated on: Sometime%g' $f
+- done
+- ;;
+- /usr/lib/libreoffice/solver/inc/*/deliver.log)
+- # LibreOffice log file
+- echo "Ignore $file"
+- return 0
+- ;;
+- /var/adm/update-messages/*|/var/adm/update-scripts/*)
+- # encode version-release inside
+- oldfn=`echo "$file"|sed -e s/-$release2/-$release1/;`
+-
+- # fetchmsttfonts embeds the release number in the update shell script.
+- echo sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
+- sed -i -e "s/-$release1/-$release2/g;" "old/$oldfn"
+-
+- if ! diff -u old/$oldfn new/$file; then
+- echo "$oldfn is not same as $file"
+- return 1
+- fi
+- echo "$file and $oldfn are same"
+- return 0
+- ;;
+- *.ps)
+- for f in "old/$file" "new/$file"; do
+- sed -i -e '
+- /^%%CreationDate:[[:blank:]]/d
+- /^%%Creator:[[:blank:]]groff[[:blank:]]version[[:blank:]]/d
+- ' "$f"
+- done
+- ;;
+- *pdf)
+- # PDF files contain a unique ID, remove it
+- # Format of the ID is:
+- # /ID [<9ACE247A70CF9BEAFEE15E116259BD6D> <9ACE247A70CF9BEAFEE15E116259BD6D>]
+- # with optional spaces. pdftex creates also:
+- # /CreationDate (D:20120103083206Z)
+- # /ModDate (D:20120103083206Z)
+- # and possibly XML metadata as well
+- for f in "old/$file" "new/$file"; do
+- sed -i \
+- '/obj/,/endobj/{
+- s%/ID \?\[ \?<[^>]\+> \?<[^>]\+> \?\]%/IDrandom%g;
+- s%/CreationDate \?(D:[^)]*)%/CreationDate (D: XXX)%g;
+- s%/ModDate \?(D:[^)]*)%/ModDate (D: XXX)%g;
+- s%<pdf:CreationDate>[^<]*</pdf:CreationDate>%<pdf:CreationDate>XXX</pdf:CreationDate>%g;
+- s%<pdf:ModDate>[^<]*</pdf:ModDate>%<pdf:ModDate>XXX</pdf:ModDate>%g;
+- s%<xap:CreateDate>[^<]*</xap:CreateDate>%<xap:CreateDate>XXX</xap:CreateDate>%g;
+- s%<xap:ModifyDate>[^<]*</xap:ModifyDate>%<xap:ModifyDate>XXX</xap:ModifyDate>%g;
+- s%<xap:MetadataDate>[^<]*</xap:MetadataDate>%<xap:MetadataDate>XXX</xap:MetadataDate>%g;
+- }' "$f"
+- done
+- ;;
+- esac
+-
+- ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
+- case $ftype in
+- PE32\ executable*Mono\/\.Net\ assembly*)
+- echo "PE32 Mono/.Net assembly: $file"
+- if [ -x /usr/bin/monodis ] ; then
+- monodis old/$file 2>/dev/null|sed -e 's/GUID = {.*}/GUID = { 42 }/;'> ${file1}
+- monodis new/$file 2>/dev/null|sed -e 's/GUID = {.*}/GUID = { 42 }/;'> ${file2}
+- if ! cmp -s ${file1} ${file2}; then
+- echo "$file differs ($ftype)"
+- diff -u ${file1} ${file2}
+- return 1
+- fi
+- else
+- echo "Cannot compare, no monodis installed"
+- return 1
+- fi
+- ;;
+- ELF*executable*|ELF*[LM]SB\ shared\ object*)
+- objdump -d --no-show-raw-insn old/$file | filter_disasm > $file1
+- if ! test -s $file1; then
+- # objdump has no idea how to handle it
+- if ! diff_two_files; then
+- ret=1
+- break
+- fi
+- fi
+- elfdiff=
+- sed -i -e "s,old/,," $file1
+- objdump -d --no-show-raw-insn new/$file | filter_disasm > $file2
+- sed -i -e "s,new/,," $file2
+- if ! diff -u $file1 $file2 > $dfile; then
+- echo "$file differs in assembler output"
+- head -n 200 $dfile
+- elfdiff="1"
+- fi
+- echo "" >$file1
+- echo "" >$file2
+- # Don't compare .build-id and .gnu_debuglink sections
+- sections="$(objdump -s new/$file | grep "Contents of section .*:" | sed -r "s,.* (.*):,\1,g" | grep -v -e "\.build-id" -e "\.gnu_debuglink" | tr "\n" " ")"
+- for section in $sections; do
+- objdump -s -j $section old/$file | sed "s,^old/,," > $file1
+- objdump -s -j $section new/$file | sed "s,^new/,," > $file2
+- if ! diff -u $file1 $file2 > $dfile; then
+- echo "$file differs in ELF section $section"
+- head -n 200 $dfile
+- elfdiff="1"
+- fi
+- done
+- if test -z "$elfdiff"; then
+- echo "$file: only difference was in build-id or gnu_debuglink, GOOD."
+- return 0
+- fi
+- return 1
+- ;;
+- *ASCII*|*text*)
+- if ! cmp -s old/$file new/$file; then
+- echo "$file differs ($ftype)"
+- diff -u old/$file new/$file | head -n 200
+- return 1
+- fi
+- ;;
+- directory|setuid,\ directory|sticky,\ directory)
+- # tar might package directories - ignore them here
+- return 0
+- ;;
+- bzip2\ compressed\ data*)
+- if ! check_compressed_file "$file" "bz2"; then
+- return 1
+- fi
+- ;;
+- gzip\ compressed\ data*)
+- if ! check_compressed_file "$file" "gzip"; then
+- return 1
+- fi
+- ;;
+- XZ\ compressed\ data*)
+- if ! check_compressed_file "$file" "xz"; then
+- return 1
+- fi
+- ;;
+- POSIX\ tar\ archive)
+- mv old/$file{,.tar}
+- mv new/$file{,.tar}
+- if ! check_single_file ${file}.tar; then
+- return 1
+- fi
+- ;;
+- cpio\ archive)
+- mv old/$file{,.cpio}
+- mv new/$file{,.cpio}
+- if ! check_single_file ${file}.cpio; then
+- return 1
+- fi
+- ;;
+- symbolic\ link\ to\ *)
+- readlink "old/$file" > $file1
+- readlink "new/$file" > $file2
+- if ! diff -u $file1 $file2; then
+- echo "symlink target for $file differs"
+- return 1
+- fi
+- ;;
+- *)
+- if ! diff_two_files; then
+- return 1
+- fi
+- ;;
+- esac
+- return 0
+-}
+-
+-# We need /proc mounted for some tests, so check that it's mounted and
+-# complain if not.
+-PROC_MOUNTED=0
+-if [ ! -d /proc/self/ ]; then
+- echo "/proc is not mounted"
+- mount -orw -n -tproc none /proc
+- PROC_MOUNTED=1
+-fi
+-
+-# preserve cmp_spec result for check_all runs
+-ret=$RES
+-for file in $files; do
+- if ! check_single_file $file; then
+- ret=1
+- if test -z "$check_all"; then
+- break
+- fi
+- fi
+-done
+-
+-if [ "$PROC_MOUNTED" -eq "1" ]; then
+- echo "Unmounting proc"
+- umount /proc
+-fi
+-
+-rm $file1 $file2 $dfile $rename_script
+-rm -rf $dir
+-if test "$ret" = 0; then
+- echo "Package content is identical"
+-fi
+-exit $ret
+-# vim: tw=666 ts=2 et
+diff --git a/same-build-result.sh b/same-build-result.sh
+index c8907e2..7e9bd4f 100644
+--- a/same-build-result.sh
++++ b/same-build-result.sh
+@@ -7,11 +7,11 @@
+ # Enhanced by Andreas Jaeger <aj@suse.de>
+ #
+ # The script decides if the new build differes from the former one,
+-# using rpm-check.sh.
++# using pkg-diff.sh.
+ # The script is called as part of the build process as:
+ # /usr/lib/build/same-build-result.sh /.build.oldpackages /usr/src/packages/RPMS /usr/src/packages/SRPMS
+
+-CMPSCRIPT=${0%/*}/rpm-check.sh
++CMPSCRIPT=${0%/*}/pkg-diff.sh
+ SCMPSCRIPT=${0%/*}/srpm-check.sh
+
+ check_all=1
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
index 01f9e6efb6..282710908e 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
@@ -2,12 +2,12 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "A set of tools for CD recording, including cdrecord"
-HOMEPAGE = "http://cdrecord.berlios.de/private/cdrecord.html"
+HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
SECTION = "console/utils"
LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
-SRC_URI = "ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-${PV}.tar.bz2"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/alpha/cdrtools-${PV}.tar.bz2"
SRC_URI[md5sum] = "f8c6f0fdcba7df0606095498d10315a7"
SRC_URI[sha256sum] = "e399ea964b8048793721b71461271e46d81f242bd2feefb8dbd259c30e75a5a9"
diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
index cd6b1d8845..e40dfdd2d8 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
@@ -15,4 +15,5 @@ SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a
CMAKE_EXTRACONF = "\
-DBUILD_CursesDialog=0 \
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 8592a23046..28b7f2d887 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -13,13 +13,13 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
- file://aarch64-cmake.patch \
- file://aarch64-kwsys.patch \
file://qt4-fail-silent.patch \
file://cmake-2.8.11.2-FindFreetype.patch \
"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
# and possibly missing qmake binary (qtbase-native can be removed from sysroot
@@ -47,5 +47,5 @@ do_configure_prepend() {
CMAKE_EXTRACONF = ""
do_configure () {
- ./configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+ ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
}
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch b/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
deleted file mode 100644
index 3e26d58267..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Riku Voipio <riku.voipio@linaro.org>
-Date: Fri, 21 Dec 2012 11:20:02 +0000 (+0200)
-Subject: KWIML: Teach ABI.h about Aarch64
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=34916522
-
-KWIML: Teach ABI.h about Aarch64
-
-The __aarch64__ defines Aarch64, while __AARCH64EB__ defines bigendian
-and __AARCH64EL__ little endian. Only little endian tested, no big
-endian toolchain exists yet.
-
-Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/ABI.h.in b/ABI.h.in
-index f93ddba..7f4772a 100644
---- a/Utilities/KWIML/ABI.h.in
-+++ b/Utilities/KWIML/ABI.h.in
-@@ -418,6 +418,14 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
- #elif defined(__vax__)
- # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
-+# else
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN)
- # error "Byte order of target CPU unknown."
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch b/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
deleted file mode 100644
index 2b68eae6c2..0000000000
--- a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: KWSys Robot <kwrobot@kitware.com>
-Date: Fri, 21 Dec 2012 13:29:37 +0000 (-0500)
-Subject: KWSys 2012-12-21 (8ce09af5)
-X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=567e7d94
-
-KWSys 2012-12-21 (8ce09af5)
-
-Extract upstream KWSys using the following shell commands.
-
-$ git archive --prefix=upstream-kwsys/ 8ce09af5 | tar x
-$ git shortlog --no-merges --abbrev=8 --format='%h %s' 933eb822..8ce09af5
-Riku Voipio (1):
- 8ce09af5 CPU: Add Aarch64 support
-
-Change-Id: I4bd0a97abaa0f958e2679afe2d4ad4bcc37434a0
-
-Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE
-
-Upstream-Status: Backport
----
-
-diff --git a/CPU.h.in b/CPU.h.in
-index ecd29d1..2e1a584 100644
---- a/Source/kwsys/CPU.h.in
-+++ b/Source/kwsys/CPU.h.in
-@@ -98,6 +98,14 @@
- #elif defined(__SYSC_ZARCH__)
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-
-+/* Aarch64 */
-+#elif defined(__aarch64__)
-+# if !defined(__AARCH64EB__)
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
-+# else
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-+# endif
-+
- /* Unknown CPU */
- #else
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID 0
diff --git a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
index 3e3a350fd8..b5151b8acd 100644
--- a/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
+++ b/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.bz2"
-COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc).*-linux"
+COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
do_install() {
oe_runmake DESTDIR="${D}" install
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
index 3cdc4c869b..0559a5c0d2 100644
--- a/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
+++ b/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch
@@ -17,7 +17,8 @@ index aba0016..cc73aa2 100755
-#!/bin/bash
+#!/bin/sh
# vim: number
-
+
# docbook-xsl-update - Update environment to latest docbook-xsl snapshot
---
+--
1.9.1
+
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index b59b25019c..d1c24b8748 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -2,13 +2,14 @@
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
SUMMARY = "DOS FAT Filesystem Utilities"
+HOMEPAGE = "http://daniel-baumann.ch/software/dosfstools/"
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
PR = "r5"
-SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d405ade410f7597d364ab5dc8c9f6/${BP}.src.tar.gz \
file://mkdosfs-bootcode.patch \
file://mkdosfs-dir.patch \
file://alignment_hack.patch \
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 92d4020276..5db1fde8f1 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,18 +2,15 @@ SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
- file://ignore_extra_fields.patch"
+SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz"
+
+SRC_URI_append_class-native = " file://tar-error-code.patch"
DEPENDS = "zlib bzip2 perl ncurses"
DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
RDEPENDS_${PN}_class-native = "xz-native"
-S = "${WORKDIR}/${BPN}-${PV}"
-
-PARALLEL_MAKE = ""
-
inherit autotools gettext perlnative pkgconfig systemd
python () {
@@ -51,7 +48,6 @@ do_install_append () {
rm ${D}${bindir}/update-alternatives
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
else
- mv ${D}${bindir}/update-alternatives ${D}${sbindir}
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
fi
@@ -72,7 +68,7 @@ PROV_class-native = ""
PROVIDES += "${PROV}"
PACKAGES =+ "update-alternatives-dpkg"
-FILES_update-alternatives-dpkg = "${sbindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
+FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
RPROVIDES_update-alternatives-dpkg += "update-alternatives"
PACKAGES += "${PN}-perl"
diff --git a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
new file mode 100644
index 0000000000..af275dec17
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
@@ -0,0 +1,38 @@
+Author: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
+Date: Wed Apr 8 18:08:14 2015 +0530
+
+[PATCH] add armeb triplet entry into triplettable.
+
+Cross-compling dpkg application for armeb fails with below error
+during configure task,
+
+(snip)
+ configure:23141: checking dpkg cpu type
+ configure:23148: result: armeb
+ configure:23150: WARNING: armeb not found in cputable
+ configure:23162: checking dpkg operating system type
+ configure:23169: result: linux-gnueabi
+ configure:23171: WARNING: linux-gnueabi not found in ostable
+ configure:23183: checking dpkg architecture name
+ configure:23189: error: cannot determine host dpkg architecture
+-- CUT --
+
+the required combination of "gnueabi-linux-armeb" was not found in
+the triplettable file thereby returning dpkg_arch as
+empty in configure script.
+
+Upstream-Status: Pending
+
+Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
+
+diff -Naurp dpkg-1.17.21_org/triplettable dpkg-1.17.21/triplettable
+--- dpkg-1.17.21_org/triplettable 2015-04-08 17:08:52.370759171 +0530
++++ dpkg-1.17.21/triplettable 2015-04-08 17:09:12.406752081 +0530
+@@ -9,6 +9,7 @@ musleabihf-linux-arm musl-linux-armhf
+ musl-linux-<cpu> musl-linux-<cpu>
+ gnueabihf-linux-arm armhf
+ gnueabi-linux-arm armel
++gnueabi-linux-armeb armeb
+ gnuabin32-linux-mips64el mipsn32el
+ gnuabin32-linux-mips64 mipsn32
+ gnuabi64-linux-mips64el mips64el
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
deleted file mode 100644
index e59c6661ea..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-dpkg: Security Advisory - CVE-2014-3127
-
-commit a12eb58959d0a10584a428f4a3103a49204c410f upstream
-
-dpkg 1.15.9 on Debian squeeze introduces support for the "C-style
-encoded filenames" feature without recognizing that the squeeze patch
-program lacks this feature, which triggers an interaction error that
-allows remote attackers to conduct directory traversal attacks and
-modify files outside of the intended directories via a crafted source
-package.
-
-NOTE: this can be considered a release engineering problem in the
-effort to fix CVE-2014-0471.
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-=====================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:32:41.765446564 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:37:21.461446359 +0800
-@@ -324,31 +324,6 @@
- return $line;
- }
-
--my %ESCAPE = ((
-- 'a' => "\a",
-- 'b' => "\b",
-- 'f' => "\f",
-- 'n' => "\n",
-- 'r' => "\r",
-- 't' => "\t",
-- 'v' => "\cK",
-- '\\' => '\\',
-- '"' => '"',
--), (
-- map { sprintf('%03o', $_) => chr($_) } (0..255)
--));
--
--sub _unescape {
-- my ($diff, $str) = @_;
--
-- if (exists $ESCAPE{$str}) {
-- return $ESCAPE{$str};
-- } else {
-- error(_g('diff %s patches file with unknown escape sequence \\%s'),
-- $diff, $str);
-- }
--}
--
- # Fetch the header filename ignoring the optional timestamp
- sub _fetch_filename {
- my ($diff, $header) = @_;
-@@ -358,12 +333,7 @@
-
- # Is it a C-style string?
- if ($header =~ m/^"/) {
-- $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-- error(_g('diff %s patches file with unbalanced quote'), $diff)
-- unless defined $1;
--
-- $header = $1;
-- $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ error(_g('diff %s patches file with C-style encoded filename'), $diff);
- } else {
- # Tab is the official separator, it's always used when
- # filename contain spaces. Try it first, otherwise strip on space
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
deleted file mode 100644
index 195d309506..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-dpkg: Security Advisory - CVE-2014-0471
-
-commit a82651188476841d190c58693f95827d61959b51 upstream
-
-Directory traversal vulnerability in the unpacking functionality in
-dpkg before 1.15.9, 1.16.x before 1.16.13, and 1.17.x before 1.17.8
-allows remote attackers to write arbitrary files via a crafted source
-package, related to "C-style filename quoting."
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-===================================================
-diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm
---- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:24:07.422446284 +0800
-+++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:41:37.746446314 +0800
-@@ -324,14 +324,53 @@
- return $line;
- }
-
--# Strip timestamp
--sub _strip_ts {
-- my $header = shift;
--
-- # Tab is the official separator, it's always used when
-- # filename contain spaces. Try it first, otherwise strip on space
-- # if there's no tab
-- $header =~ s/\s.*// unless ($header =~ s/\t.*//);
-+my %ESCAPE = ((
-+ 'a' => "\a",
-+ 'b' => "\b",
-+ 'f' => "\f",
-+ 'n' => "\n",
-+ 'r' => "\r",
-+ 't' => "\t",
-+ 'v' => "\cK",
-+ '\\' => '\\',
-+ '"' => '"',
-+), (
-+ map { sprintf('%03o', $_) => chr($_) } (0..255)
-+));
-+
-+sub _unescape {
-+ my ($diff, $str) = @_;
-+
-+ if (exists $ESCAPE{$str}) {
-+ return $ESCAPE{$str};
-+ } else {
-+ error(_g('diff %s patches file with unknown escape sequence \\%s'),
-+ $diff, $str);
-+ }
-+}
-+
-+# Fetch the header filename ignoring the optional timestamp
-+sub _fetch_filename {
-+ my ($diff, $header) = @_;
-+
-+ # Strip any leading spaces.
-+ $header =~ s/^\s+//;
-+
-+ # Is it a C-style string?
-+ if ($header =~ m/^"/) {
-+ $header =~ m/^"((?:[^\\"]|\\.)*)"/;
-+ error(_g('diff %s patches file with unbalanced quote'), $diff)
-+ unless defined $1;
-+
-+ $header = $1;
-+ $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg;
-+ } else {
-+ # Tab is the official separator, it's always used when
-+ # filename contain spaces. Try it first, otherwise strip on space
-+ # if there's no tab
-+ $header =~ s/\s.*// unless $header =~ s/\t.*//;
-+ }
-+
- return $header;
- }
-
-@@ -400,7 +439,7 @@
- unless(s/^--- //) {
- error(_g("expected ^--- in line %d of diff `%s'"), $., $diff);
- }
-- $path{old} = $_ = _strip_ts($_);
-+ $path{old} = $_ = _fetch_filename($diff, $_);
- $fn{old} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
- if (/\.dpkg-orig$/) {
- error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff);
-@@ -412,7 +451,7 @@
- unless (s/^\+\+\+ //) {
- error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.);
- }
-- $path{new} = $_ = _strip_ts($_);
-+ $path{new} = $_ = _fetch_filename($diff, $_);
- $fn{new} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/};
-
- unless (defined $fn{old} or defined $fn{new}) {
diff --git a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
deleted file mode 100644
index 4e3eb97ed8..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [workaround]
-
-Index: dpkg-1.16.8/dpkg-deb/build.c
-===================================================================
---- dpkg-1.16.8.orig/dpkg-deb/build.c
-+++ dpkg-1.16.8/dpkg-deb/build.c
-@@ -340,13 +340,13 @@ check_new_pkg(const char *dir)
- if (pkg->priority == pri_other)
- warning(_("'%s' contains user-defined Priority value '%s'"),
- controlfile, pkg->otherpriority);
-- for (field = pkg->available.arbs; field; field = field->next) {
-+ /*for (field = pkg->available.arbs; field; field = field->next) {
- if (known_arbitrary_field(field))
- continue;
-
- warning(_("'%s' contains user-defined field '%s'"), controlfile,
- field->name);
-- }
-+ }*/
-
- free(controlfile);
diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
index 0e57dbc7fc..f660b18646 100644
--- a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
@@ -11,22 +11,22 @@ Upstream-Status: Pending
Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
m4/dpkg-compiler.m4 | 1 -
1 file changed, 1 deletion(-)
diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
-index f1c760b..500b5ad 100644
+index 53f67c6..6e66a43 100644
--- a/m4/dpkg-compiler.m4
+++ b/m4/dpkg-compiler.m4
-@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then
- DPKG_WARNING_ALL([-Wformat-security])
- DPKG_WARNING_ALL([-Wpointer-arith])
- DPKG_WARNING_ALL([-Wlogical-op])
-- DPKG_WARNING_ALL([-Wvla])
- DPKG_WARNING_ALL([-Winit-self])
- DPKG_WARNING_ALL([-Wwrite-strings])
- DPKG_WARNING_ALL([-Wcast-align])
---
-1.7.10.4
-
+@@ -49,7 +49,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
+ DPKG_CHECK_COMPILER_FLAG([-Wformat-security])
+ DPKG_CHECK_COMPILER_FLAG([-Wpointer-arith])
+ DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
+- DPKG_CHECK_COMPILER_FLAG([-Wvla])
+ DPKG_CHECK_COMPILER_FLAG([-Winit-self])
+ DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
+ DPKG_CHECK_COMPILER_FLAG([-Wcast-align])
+---
+1.17.21
diff --git a/meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch b/meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch
new file mode 100644
index 0000000000..7be2090206
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch
@@ -0,0 +1,54 @@
+When running do_package_write_deb, we have trees of hardlinked files
+such as the dbg source files in ${PN}-dbg. If something makes another
+copy of one of those files (or deletes one), the number of links a file
+has changes and tar can notice this, e.g.:
+
+| DEBUG: Executing python function do_package_deb
+| dpkg-deb: building package `sed-ptest' in `/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'.
+| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it
+| dpkg-deb: error: subprocess tar -cf returned error exit status 1
+
+Tar returns an error of 1 when files 'change' and other errors codes
+in other error cases. We tweak dpkg-deb here so that it ignores an exit
+code of 1 from tar. The files don't really change (and we have locking in
+place to avoid that kind of issue).
+
+Upsteam-Status: Inappropriate
+RP 2015/3/27
+
+Index: dpkg-1.17.21/dpkg-deb/build.c
+===================================================================
+--- dpkg-1.17.21.orig/dpkg-deb/build.c
++++ dpkg-1.17.21/dpkg-deb/build.c
+@@ -398,7 +398,7 @@ do_build(const char *const *argv)
+ bool subdir;
+ char *tfbuf;
+ int arfd;
+- int p1[2], p2[2], gzfd;
++ int p1[2], p2[2], gzfd, rc;
+ pid_t c1, c2;
+
+ /* Decode our arguments. */
+@@ -493,7 +493,9 @@ do_build(const char *const *argv)
+ }
+ close(p1[0]);
+ subproc_reap(c2, "gzip -9c", 0);
+- subproc_reap(c1, "tar -cf", 0);
++ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
++ if (rc && rc != 1)
++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
+
+ if (lseek(gzfd, 0, SEEK_SET))
+ ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
+@@ -581,7 +583,10 @@ do_build(const char *const *argv)
+ /* All done, clean up wait for tar and gzip to finish their job. */
+ close(p1[1]);
+ subproc_reap(c2, _("<compress> from tar -cf"), 0);
+- subproc_reap(c1, "tar -cf", 0);
++ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
++ if (rc && rc != 1)
++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
++
+ /* Okay, we have data.tar as well now, add it to the ar wrapper. */
+ if (deb_format.major == 2) {
+ char datamember[16 + 1];
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
index 83526f3c96..ebb8671473 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
@@ -12,10 +12,9 @@ SRC_URI += "file://noman.patch \
file://dpkg-configure.service \
file://glibc2.5-sync_file_range.patch \
file://no-vla-warning.patch \
- file://dpkg-1.17.4-CVE-2014-0471.patch \
- file://dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch \
+ file://add_armeb_triplet_entry.patch \
"
-SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
-SRC_URI[sha256sum] = "01cdc81c33e77c3d7c40df17e19171794542be7cf12e411381ffcaa8f87b1854"
+SRC_URI[md5sum] = "765a96fd0180196613bbfa3c4aef0775"
+SRC_URI[sha256sum] = "3ed776627181cb9c1c9ba33f94a6319084be2e9ec9c23dd61ce784c4f602cf05"
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch
new file mode 100644
index 0000000000..4de67c9704
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch
@@ -0,0 +1,58 @@
+From f66e6ce4446738c2c7f43d41988a3eb73347e2f5 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Sat, 9 Aug 2014 12:24:54 -0400
+Subject: libext2fs: avoid buffer overflow if s_first_meta_bg is too big
+
+If s_first_meta_bg is greater than the of number block group
+descriptor blocks, then reading or writing the block group descriptors
+will end up overruning the memory buffer allocated for the
+descriptors. Fix this by limiting first_meta_bg to no more than
+fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value,
+but it avoids causing the e2fsprogs userspace programs from
+potentially crashing.
+
+Fixes CVE-2015-0247
+Upstream-Status: Backport
+
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+
+diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
+index 4599eef..1f99113 100644
+--- a/lib/ext2fs/closefs.c
++++ b/lib/ext2fs/closefs.c
+@@ -344,9 +344,11 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
+ * superblocks and group descriptors.
+ */
+ group_ptr = (char *) group_shadow;
+- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
++ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
+ old_desc_blocks = fs->super->s_first_meta_bg;
+- else
++ if (old_desc_blocks > fs->super->s_first_meta_bg)
++ old_desc_blocks = fs->desc_blocks;
++ } else
+ old_desc_blocks = fs->desc_blocks;
+
+ ext2fs_numeric_progress_init(fs, &progress, NULL,
+diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
+index a1a3517..ba501e6 100644
+--- a/lib/ext2fs/openfs.c
++++ b/lib/ext2fs/openfs.c
+@@ -378,9 +378,11 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
+ #ifdef WORDS_BIGENDIAN
+ groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
+ #endif
+- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
++ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
+ first_meta_bg = fs->super->s_first_meta_bg;
+- else
++ if (first_meta_bg > fs->desc_blocks)
++ first_meta_bg = fs->desc_blocks;
++ } else
+ first_meta_bg = fs->desc_blocks;
+ if (first_meta_bg) {
+ retval = io_channel_read_blk(fs->io, group_block +
+--
+cgit v0.10.2
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch
new file mode 100644
index 0000000000..f9ef8e5f26
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch
@@ -0,0 +1,52 @@
+The comment to this function says:
+
+"""
+ * Stupid algorithm --- we now just search forward starting from the
+ * goal. Should put in a smarter one someday....
+"""
+
+This adds in a rather hacky algorthim which starts where we finished
+searching previously using a static variable rather than starting
+from scratch if a hint isn't provided.
+
+This was after noticing that mkfs.ext4 -F X -d Y was spending *lots*
+of time in ext2fs_new_block2 called from ext2fs_bmap from ext2fs_file_write().
+
+Numbers wise, this took a core-image-sato-sdk mkfs time from over
+8 minutes to around 35 seconds.
+
+Upstream-Status: Pending
+
+RP 2015/02/20
+
+Index: e2fsprogs-1.42.9/lib/ext2fs/alloc.c
+===================================================================
+--- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc.c
++++ e2fsprogs-1.42.9/lib/ext2fs/alloc.c
+@@ -160,6 +160,8 @@ errcode_t ext2fs_new_inode(ext2_filsys f
+ return 0;
+ }
+
++static blk64_t last_goal = 0;
++
+ /*
+ * Stupid algorithm --- we now just search forward starting from the
+ * goal. Should put in a smarter one someday....
+@@ -170,6 +172,9 @@ errcode_t ext2fs_new_block2(ext2_filsys
+ blk64_t i;
+ int c_ratio;
+
++ if (!goal)
++ goal = last_goal;
++
+ EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
+
+ if (!map)
+@@ -194,6 +199,7 @@ errcode_t ext2fs_new_block2(ext2_filsys
+
+ if (!ext2fs_fast_test_block_bitmap2(map, i)) {
+ *ret = i;
++ last_goal = i;
+ return 0;
+ }
+ i = (i + c_ratio) & ~(c_ratio - 1);
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 1fb4a6cd85..66065bc049 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -19,6 +19,8 @@ SRC_URI += "file://acinclude.m4 \
file://0012-Fix-musl-build-failures.patch \
file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
file://misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch \
+ file://cache_inode.patch \
+ file://CVE-2015-0247.patch \
"
SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
@@ -63,9 +65,10 @@ do_install_append_class-target() {
RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks"
+PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
PACKAGES =+ "libcomerr libss libe2p libext2fs"
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
@@ -76,7 +79,7 @@ FILES_libe2p = "${base_libdir}/libe2p.so.*"
FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
inherit update-alternatives
diff --git a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
index d4e4675ad5..d4e4675ad5 100644
--- a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
index 5baa709000..5baa709000 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
index b619619ec0..b619619ec0 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
index 0ff353d0de..0ff353d0de 100644
--- a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
index 0e28690207..0e28690207 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
index bd634b4418..bd634b4418 100644
--- a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
index a86b97c683..a86b97c683 100644
--- a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
index 5b621f92ff..5b621f92ff 100644
--- a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
index 3f81a75b1a..3f81a75b1a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
index 2b5dad368a..2b5dad368a 100644
--- a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
index b8a912c412..b8a912c412 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
index cd398549df..cd398549df 100644
--- a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
index 6a19791480..6a19791480 100644
--- a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
index d792d5fd73..d792d5fd73 100644
--- a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
index 3cf16ac923..3cf16ac923 100644
--- a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
deleted file mode 100644
index 6c44314589..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 7f1eec317db79627b473c5b149a22a1b20d1f68f Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mjw@redhat.com>
-Date: Wed, 9 Apr 2014 11:33:23 +0200
-Subject: [PATCH] CVE-2014-0172 Check for overflow before calling malloc to
- uncompress data.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1085663
-
-Reported-by: Florian Weimer <fweimer@redhat.com>
-Signed-off-by: Mark Wielaard <mjw@redhat.com>
-
-Index: elfutils-0.158/libdw/dwarf_begin_elf.c
-===================================================================
---- elfutils-0.158.orig/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.928213292 +0000
-+++ elfutils-0.158/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.924213375 +0000
-@@ -1,5 +1,5 @@
- /* Create descriptor from ELF descriptor for processing file.
-- Copyright (C) 2002-2011 Red Hat, Inc.
-+ Copyright (C) 2002-2011, 2014 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-@@ -289,6 +289,12 @@
- memcpy (&size, data->d_buf + 4, sizeof size);
- size = be64toh (size);
-
-+ /* Check for unsigned overflow so malloc always allocated
-+ enough memory for both the Elf_Data header and the
-+ uncompressed section data. */
-+ if (unlikely (sizeof (Elf_Data) + size < size))
-+ break;
-+
- Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
- if (unlikely (zdata == NULL))
- break;
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
deleted file mode 100644
index e2f0576d7b..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Matthias Klose <doko@ubuntu.com>
-Date: Tue, 7 Jan 2014 10:25:29 +0100
-Subject: [PATCH] tests: backtrace-subr.sh (check_native_core) should check
- core file name.
-
-Needed when /proc/sys/kernel/core_uses_pid is set to 0. Try to rename
-the core file, and if it does still fail, skip the test.
-
-diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
-index e7ece91..62b873c 100644
---- a/tests/backtrace-subr.sh
-+++ b/tests/backtrace-subr.sh
-@@ -111,6 +111,11 @@ check_native_core()
-
- # Skip the test if we cannot adjust core ulimit.
- core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`"
-+ # see if /proc/sys/kernel/core_uses_pid is set to 0
-+ if [ -f core ]; then
-+ mv core "$core"
-+ fi
-+ if [ ! -f "$core" ]; then exit 77; fi
-
- if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then
- VALGRIND_CMD="$SAVED_VALGRIND_CMD"
---
-1.9.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
deleted file mode 100644
index 671c8ee1ae..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- libelf/elf.h | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/libelf/elf.h b/libelf/elf.h
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -142,6 +142,7 @@ typedef struct
- #define ELFOSABI_NETBSD 2 /* NetBSD. */
- #define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
- #define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
-+#define ELFOSABI_HURD 4 /* GNU/Hurd */
- #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
- #define ELFOSABI_AIX 7 /* IBM AIX. */
- #define ELFOSABI_IRIX 8 /* SGI Irix. */
-@@ -149,8 +150,13 @@ typedef struct
- #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
- #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
- #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
-+#define ELFOSABI_OPENVMS 13 /* OpenVMS */
-+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-+#define ELFOSABI_AROS 15 /* Amiga Research OS */
-+/* 64-255 Architecture-specific value range */
- #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
- #define ELFOSABI_ARM 97 /* ARM */
-+/* This is deprecated? It's not in the latest version anymore. */
- #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
- #define EI_ABIVERSION 8 /* ABI version */
-@@ -205,7 +211,7 @@ typedef struct
- #define EM_H8_300H 47 /* Hitachi H8/300H */
- #define EM_H8S 48 /* Hitachi H8S */
- #define EM_H8_500 49 /* Hitachi H8/500 */
--#define EM_IA_64 50 /* Intel Merced */
-+#define EM_IA_64 50 /* Intel IA64 */
- #define EM_MIPS_X 51 /* Stanford MIPS-X */
- #define EM_COLDFIRE 52 /* Motorola Coldfire */
- #define EM_68HC12 53 /* Motorola M68HC12 */
-@@ -219,7 +225,8 @@ typedef struct
- #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/
- #define EM_X86_64 62 /* AMD x86-64 architecture */
- #define EM_PDSP 63 /* Sony DSP Processor */
--
-+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
- #define EM_FX66 66 /* Siemens FX66 microcontroller */
- #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */
- #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */
-@@ -249,6 +256,22 @@ typedef struct
- #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
- #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
- #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-+#define EM_NS32K 97 /* National Semiconductor 32000 series */
-+#define EM_TPC 98 /* Tenor Network TPC processor */
-+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
-+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */
-+#define EM_MAX 102 /* MAX Processor */
-+#define EM_CR 103 /* National Semiconductor CompactRISC */
-+#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-+#define EM_MSP430 105 /* TI msp430 micro controller */
-+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
-+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-+#define EM_SEP 108 /* Sharp embedded microprocessor */
-+#define EM_ARCA 109 /* Arca RISC Microprocessor */
-+
- #define EM_AARCH64 183 /* ARM AARCH64 */
- #define EM_TILEPRO 188 /* Tilera TILEPro */
- #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
deleted file mode 100644
index 1dbd52d557..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-m4/biarch.m4: tweak AC_RUN_IFELSE for cross-compiling
-
-Macro: AC_RUN_IFELSE (input,
- [action-if-true],
- [action-if-false],
- [action-if-cross-compiling])
-
-Add the missing [action-if-cross-compiling] part to support
-cross-compiling.
-
-Upstream-Status: inappropriate [oe specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- m4/biarch.m4 | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/m4/biarch.m4 b/m4/biarch.m4
---- a/m4/biarch.m4
-+++ b/m4/biarch.m4
-@@ -40,7 +40,9 @@ AC_CACHE_CHECK([whether $biarch_CC makes executables we can run],
- save_CC="$CC"
- CC="$biarch_CC"
- AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
-- utrace_cv_cc_biarch=yes, utrace_cv_cc_biarch=no)
-+ utrace_cv_cc_biarch=yes,
-+ utrace_cv_cc_biarch=no,
-+ utrace_cv_cc_biarch=yes)
- CC="$save_CC"])], [utrace_cv_cc_biarch=no])
- AS_IF([test $utrace_cv_cc_biarch != yes], [dnl
- AC_MSG_WARN([not running biarch tests, $biarch_CC does not work])])])
---
-1.8.1.2
-
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
deleted file mode 100644
index f358a85466..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff
+++ /dev/null
@@ -1,1756 +0,0 @@
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -680,6 +680,11 @@
- * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
- Reported by Kurt Roeckx <kurt@roeckx.be>.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * relocate.c (relocate_section): Use gelf_fsize instead of relying
-+ on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
---- elfutils/libdwfl/relocate.c
-+++ elfutils/libdwfl/relocate.c
-@@ -1,5 +1,5 @@
- /* Relocate debug information.
-- Copyright (C) 2005-2010 Red Hat, Inc.
-+ Copyright (C) 2005-2011 Red Hat, Inc.
- This file is part of elfutils.
-
- This file is free software; you can redistribute it and/or modify
-@@ -456,7 +456,10 @@ relocate_section (Dwfl_Module *mod, Elf
- }
- }
-
-- size_t nrels = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize
-+ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA,
-+ 1, EV_CURRENT);
-+ size_t nrels = shdr->sh_size / sh_entsize;
- size_t complete = 0;
- if (shdr->sh_type == SHT_REL)
- for (size_t relidx = 0; !result && relidx < nrels; ++relidx)
-@@ -558,7 +561,7 @@ relocate_section (Dwfl_Module *mod, Elf
- nrels = next;
- }
-
-- shdr->sh_size = reldata->d_size = nrels * shdr->sh_entsize;
-+ shdr->sh_size = reldata->d_size = nrels * sh_entsize;
- gelf_update_shdr (scn, shdr);
- }
-
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -754,10 +754,53 @@
- If section content hasn't been read yet, do it before looking for the
- block size. If no section data present, infer size of section header.
-
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * libelfP.h (INVALID_NDX): Define.
-+ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any.
-+ * gelf_getlib.c (gelf_getlib): Likewise.
-+ * gelf_getmove.c (gelf_getmove): Likewise.
-+ * gelf_getrel.c (gelf_getrel): Likewise.
-+ * gelf_getrela.c (gelf_getrela): Likewise.
-+ * gelf_getsym.c (gelf_getsym): Likewise.
-+ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise.
-+ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise.
-+ * gelf_getversym.c (gelf_getversym): Likewise.
-+ * gelf_update_dyn.c (gelf_update_dyn): Likewise.
-+ * gelf_update_lib.c (gelf_update_lib): Likewise.
-+ * gelf_update_move.c (gelf_update_move): Likewise.
-+ * gelf_update_rel.c (gelf_update_rel): Likewise.
-+ * gelf_update_rela.c (gelf_update_rela): Likewise.
-+ * gelf_update_sym.c (gelf_update_sym): Likewise.
-+ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise.
-+ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise.
-+ * gelf_update_versym.c (gelf_update_versym): Likewise.
-+ * elf_newscn.c (elf_newscn): Check for overflow.
-+ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise.
-+ (__elfw2(LIBELFBITS,updatefile)): Likewise.
-+ * elf_begin.c (file_read_elf): Likewise.
-+ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise.
-+ * elf_getarsym.c (elf_getarsym): Likewise.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise.
- 2005-05-11 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update again.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header
-+ table fits into object's bounds.
-+ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to
-+ elf->map_address. Check if first section header fits into object's
-+ bounds.
-+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)):
-+ Check if section header table fits into object's bounds.
-+ * elf_begin.c (get_shnum): Ensure section headers fits into
-+ object's bounds.
-+ (file_read_elf): Make sure scncnt is small enough to allocate both
-+ ElfXX_Shdr and Elf_Scn array. Make sure section and program header
-+ tables fit into object's bounds. Avoid memory leak on failure.
-+
- 2005-05-09 Ulrich Drepper <drepper@redhat.com>
-
- * elf.h: Update from glibc.
---- elfutils/libelf/elf32_getphdr.c
-+++ elfutils/libelf/elf32_getphdr.c
-@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_phoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_phoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_PHDR);
-+ goto out;
-+ }
-+
- /* All the data is already mapped. Use it. */
- void *file_phdr = ((char *) elf->map_address
- + elf->start_offset + ehdr->e_phoff);
---- elfutils/libelf/elf32_getshdr.c
-+++ elfutils/libelf/elf32_getshdr.c
-@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn)
- goto out;
-
- size_t shnum;
-- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0)
-+ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0
-+ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
- goto out;
- size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
-
-@@ -77,6 +78,16 @@ load_shdr_wrlock (Elf_Scn *scn)
-
- if (elf->map_address != NULL)
- {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (ehdr->e_shoff >= elf->maximum_size)
-+ || unlikely (elf->maximum_size - ehdr->e_shoff < size))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ goto free_and_out;
-+ }
-+
- ElfW2(LIBELFBITS,Shdr) *notcvt;
-
- /* All the data is already mapped. If we could use it
---- elfutils/libelf/elf32_newphdr.c
-+++ elfutils/libelf/elf32_newphdr.c
-@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count)
- || count == PN_XNUM
- || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
- {
-+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
-+ {
-+ result = NULL;
-+ goto out;
-+ }
-+
- /* Allocate a new program header with the appropriate number of
- elements. */
- result = (ElfW2(LIBELFBITS,Phdr) *)
---- elfutils/libelf/elf32_updatefile.c
-+++ elfutils/libelf/elf32_updatefile.c
-@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
-+ return 1;
-+
- Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
- Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
- char *const shdr_start = ((char *) elf->map_address + elf->start_offset
-@@ -624,6 +627,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf
- /* Write all the sections. Well, only those which are modified. */
- if (shnum > 0)
- {
-+ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
-+ + sizeof (ElfW2(LIBELFBITS,Shdr)))))
-+ return 1;
-+
- off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
- #if EV_NUM != 2
- xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
---- elfutils/libelf/elf_begin.c
-+++ elfutils/libelf/elf_begin.c
-@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
- {
-- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
-+ if (unlikely (ehdr.e32->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr)))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -192,7 +193,8 @@ get_shnum (void *map_address, unsigned c
-
- if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
- {
-- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
-+ if (unlikely (ehdr.e64->e_shoff >= maxsize)
-+ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
- /* Cannot read the first section header. */
- return 0;
-
-@@ -264,6 +266,15 @@ file_read_elf (int fildes, void *map_add
- /* Could not determine the number of sections. */
- return NULL;
-
-+ /* Check for too many sections. */
-+ if (e_ident[EI_CLASS] == ELFCLASS32)
-+ {
-+ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
-+ return NULL;
-+ }
-+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
-+ return NULL;
-+
- /* We can now allocate the memory. Even if there are no section headers,
- we allocate space for a zeroth section in case we need it later. */
- const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP)
-@@ -303,6 +314,16 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf32.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (maxsize - ehdr->e_shoff
-+ < scncnt * sizeof (Elf32_Shdr)))
-+ {
-+ free_and_out:
-+ free (elf);
-+ __libelf_seterrno (ELF_E_INVALID_FILE);
-+ return NULL;
-+ }
- elf->state.elf32.shdr
- = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
-@@ -389,6 +410,11 @@ file_read_elf (int fildes, void *map_add
- {
- /* We can use the mmapped memory. */
- elf->state.elf64.ehdr = ehdr;
-+
-+ if (unlikely (ehdr->e_shoff >= maxsize)
-+ || unlikely (ehdr->e_shoff
-+ + scncnt * sizeof (Elf32_Shdr) > maxsize))
-+ goto free_and_out;
- elf->state.elf64.shdr
- = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
---- elfutils/libelf/elf_getarsym.c
-+++ elfutils/libelf/elf_getarsym.c
-@@ -183,6 +183,9 @@ elf_getarsym (elf, ptr)
- size_t index_size = atol (tmpbuf);
-
- if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
-+#if SIZE_MAX <= 4294967295U
-+ || n >= SIZE_MAX / sizeof (Elf_Arsym)
-+#endif
- || n * w > index_size)
- {
- /* This index table cannot be right since it does not fit into
---- elfutils/libelf/elf_getshdrstrndx.c
-+++ elfutils/libelf/elf_getshdrstrndx.c
-@@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf32_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf32_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
-@@ -142,10 +157,25 @@ elf_getshdrstrndx (elf, dst)
- if (elf->map_address != NULL
- && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
- && (ALLOW_UNALIGNED
-- || (((size_t) ((char *) elf->map_address + offset))
-+ || (((size_t) ((char *) elf->map_address
-+ + elf->start_offset + offset))
- & (__alignof__ (Elf64_Shdr) - 1)) == 0))
-- /* We can directly access the memory. */
-- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
-+ {
-+ /* First see whether the information in the ELF header is
-+ valid and it does not ask for too much. */
-+ if (unlikely (elf->maximum_size - offset
-+ < sizeof (Elf64_Shdr)))
-+ {
-+ /* Something is wrong. */
-+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-+ result = -1;
-+ goto out;
-+ }
-+
-+ /* We can directly access the memory. */
-+ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset
-+ + offset))->sh_link;
-+ }
- else
- {
- /* We avoid reading in all the section headers. Just read
---- elfutils/libelf/elf_newscn.c
-+++ elfutils/libelf/elf_newscn.c
-@@ -83,10 +83,18 @@ elf_newscn (elf)
- else
- {
- /* We must allocate a new element. */
-- Elf_ScnList *newp;
-+ Elf_ScnList *newp = NULL;
-
- assert (elf->state.elf.scnincr > 0);
-
-+ if (
-+#if SIZE_MAX <= 4294967295U
-+ likely (elf->state.elf.scnincr
-+ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
-+#else
-+ 1
-+#endif
-+ )
- newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
- + ((elf->state.elf.scnincr *= 2)
- * sizeof (Elf_Scn)), 1);
---- elfutils/libelf/gelf_getdyn.c
-+++ elfutils/libelf/gelf_getdyn.c
-@@ -1,5 +1,5 @@
- /* Get information from dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -72,7 +72,7 @@ gelf_getdyn (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +93,7 @@ gelf_getdyn (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getlib.c
-+++ elfutils/libelf/gelf_getlib.c
-@@ -1,5 +1,5 @@
- /* Get library from table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -65,7 +65,7 @@ gelf_getlib (data, ndx, dst)
- /* The data is already in the correct form. Just make sure the
- index is OK. */
- GElf_Lib *result = NULL;
-- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Lib, data))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_getmove.c
-+++ elfutils/libelf/gelf_getmove.c
-@@ -1,5 +1,5 @@
- /* Get move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -62,7 +62,7 @@ gelf_getmove (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getrela.c
-+++ elfutils/libelf/gelf_getrela.c
-@@ -1,5 +1,5 @@
- /* Get RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getrel.c
-+++ elfutils/libelf/gelf_getrel.c
-@@ -1,5 +1,5 @@
- /* Get REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_getrel (data, ndx, dst)
- if (data_scn == NULL)
- return NULL;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return NULL;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- __libelf_seterrno (ELF_E_INVALID_HANDLE);
-@@ -72,7 +66,7 @@ gelf_getrel (data, ndx, dst)
- if (scn->elf->class == ELFCLASS32)
- {
- /* We have to convert the data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
-@@ -92,7 +86,7 @@ gelf_getrel (data, ndx, dst)
- {
- /* Simply copy the data after we made sure we are actually getting
- correct data. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_getsym.c
-+++ elfutils/libelf/gelf_getsym.c
-@@ -1,5 +1,5 @@
- /* Get symbol information from symbol table at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -69,7 +69,7 @@ gelf_getsym (data, ndx, dst)
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -98,7 +98,7 @@ gelf_getsym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsyminfo.c
-+++ elfutils/libelf/gelf_getsyminfo.c
-@@ -1,5 +1,5 @@
- /* Get additional symbol information from symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -63,7 +63,7 @@ gelf_getsyminfo (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getsymshndx.c
-+++ elfutils/libelf/gelf_getsymshndx.c
-@@ -1,6 +1,6 @@
- /* Get symbol information and separate section index from symbol table
- at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -69,7 +69,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- section index table. */
- if (likely (shndxdata_scn != NULL))
- {
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -89,7 +89,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
- table entries has to be adopted. The user better has provided
- a buffer where we can store the information. While copying the
- data we are converting the format. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -118,7 +118,7 @@ gelf_getsymshndx (symdata, shndxdata, nd
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
-+ if (INVALID_NDX (ndx, GElf_Sym, symdata))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_getversym.c
-+++ elfutils/libelf/gelf_getversym.c
-@@ -1,5 +1,5 @@
- /* Get symbol version information at the given index.
-- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 1999-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 1999.
-
-@@ -71,7 +71,7 @@ gelf_getversym (data, ndx, dst)
-
- /* The data is already in the correct form. Just make sure the
- index is OK. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, data))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- result = NULL;
---- elfutils/libelf/gelf_update_dyn.c
-+++ elfutils/libelf/gelf_update_dyn.c
-@@ -1,5 +1,5 @@
- /* Update information in dynamic table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -50,12 +50,6 @@ gelf_update_dyn (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_DYN))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_dyn (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -95,7 +89,7 @@ gelf_update_dyn (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_lib.c
-+++ elfutils/libelf/gelf_update_lib.c
-@@ -1,5 +1,5 @@
- /* Update library in table at the given index.
-- Copyright (C) 2004 Red Hat, Inc.
-+ Copyright (C) 2004-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2004.
-
-@@ -47,12 +47,6 @@ gelf_update_lib (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
- if (unlikely (data_scn->d.d_type != ELF_T_LIB))
- {
-@@ -66,7 +60,7 @@ gelf_update_lib (data, ndx, src)
-
- /* Check whether we have to resize the data buffer. */
- int result = 0;
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d))
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- else
- {
---- elfutils/libelf/gelf_update_move.c
-+++ elfutils/libelf/gelf_update_move.c
-@@ -1,5 +1,5 @@
- /* Update move structure at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -54,8 +54,7 @@ gelf_update_move (data, ndx, src)
- assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/gelf_update_rela.c
-+++ elfutils/libelf/gelf_update_rela.c
-@@ -1,5 +1,5 @@
- /* Update RELA relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_RELA))
- {
- /* The type of the data better should match. */
-@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_rel.c
-+++ elfutils/libelf/gelf_update_rel.c
-@@ -1,5 +1,5 @@
- /* Update REL relocation information at given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -47,12 +47,6 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- if (dst == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_REL))
- {
- /* The type of the data better should match. */
-@@ -78,7 +72,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -93,7 +87,7 @@ gelf_update_rel (Elf_Data *dst, int ndx,
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_sym.c
-+++ elfutils/libelf/gelf_update_sym.c
-@@ -1,5 +1,5 @@
- /* Update symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_sym (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -81,7 +75,7 @@ gelf_update_sym (data, ndx, src)
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -104,7 +98,7 @@ gelf_update_sym (data, ndx, src)
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_syminfo.c
-+++ elfutils/libelf/gelf_update_syminfo.c
-@@ -1,5 +1,5 @@
- /* Update additional symbol information in symbol table at the given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -51,12 +51,6 @@ gelf_update_syminfo (data, ndx, src)
- if (data == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
- {
- /* The type of the data better should match. */
-@@ -72,7 +66,7 @@ gelf_update_syminfo (data, ndx, src)
- rwlock_wrlock (scn->elf->lock);
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_symshndx.c
-+++ elfutils/libelf/gelf_update_symshndx.c
-@@ -1,6 +1,6 @@
- /* Update symbol information and section index in symbol table at the
- given index.
-- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2000-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
-@@ -56,12 +56,6 @@ gelf_update_symshndx (symdata, shndxdata
- if (symdata == NULL)
- return 0;
-
-- if (unlikely (ndx < 0))
-- {
-- __libelf_seterrno (ELF_E_INVALID_INDEX);
-- return 0;
-- }
--
- if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
- {
- /* The type of the data better should match. */
-@@ -107,7 +101,7 @@ gelf_update_symshndx (symdata, shndxdata
- }
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
-@@ -130,7 +124,7 @@ gelf_update_symshndx (symdata, shndxdata
- else
- {
- /* Check whether we have to resize the data buffer. */
-- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
-+ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- goto out;
---- elfutils/libelf/gelf_update_versym.c
-+++ elfutils/libelf/gelf_update_versym.c
-@@ -1,5 +1,5 @@
- /* Update symbol version information.
-- Copyright (C) 2001, 2002 Red Hat, Inc.
-+ Copyright (C) 2001-2009 Red Hat, Inc.
- This file is part of elfutils.
- Written by Ulrich Drepper <drepper@redhat.com>, 2001.
-
-@@ -54,8 +54,7 @@ gelf_update_versym (data, ndx, src)
- assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
-
- /* Check whether we have to resize the data buffer. */
-- if (unlikely (ndx < 0)
-- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
-+ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d))
- {
- __libelf_seterrno (ELF_E_INVALID_INDEX);
- return 0;
---- elfutils/libelf/libelfP.h
-+++ elfutils/libelf/libelfP.h
-@@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t
- /* Align offset to 4 bytes as needed for note name and descriptor data. */
- #define NOTE_ALIGN(n) (((n) + 3) & -4U)
-
-+/* Convenience macro. */
-+#define INVALID_NDX(ndx, type, data) \
-+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
-+
- #endif /* libelfP.h */
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -702,6 +702,12 @@
-
- * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
-
-+2011-03-23 Petr Machata <pmachata@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_relocs_rel)
-+ (handle_relocs_rela, handle_versym, print_liblist):
-+ Use gelf_fsize instead of relying on shdr->sh_entsize.
-+
- 2011-02-11 Roland McGrath <roland@redhat.com>
-
- * elfcmp.c (verbose): New variable.
-@@ -2414,6 +2420,16 @@
- object symbols or symbols with unknown type.
- (check_rel): Likewise.
-
-+2005-06-09 Roland McGrath <roland@redhat.com>
-+
-+ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link.
-+ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise.
-+ (handle_scngrp): Check for bogus sh_info.
-+
-+ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info,
-+ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data.
-+ Don't use assert on input values, instead bail with "illformed" error.
-+
- 2005-06-08 Roland McGrath <roland@redhat.com>
-
- * readelf.c (print_ops): Add consts.
-@@ -2459,6 +2475,19 @@
-
- * readelf.c (dwarf_tag_string): Add new tags.
-
-+2005-05-17 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (check_hash): Don't check entries beyond end of section.
-+ (check_note): Don't crash if gelf_rawchunk fails.
-+ (section_name): Return <invalid> if gelf_getshdr returns NULL.
-+
-+2005-05-14 Jakub Jelinek <jakub@redhat.com>
-+
-+ * elflint.c (section_name): Return "<invalid>" instead of
-+ crashing on invalid section name.
-+ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic,
-+ check_symtab_shndx, check_hash, check_versym): Robustify.
-+
- 2005-05-08 Roland McGrath <roland@redhat.com>
-
- * strip.c (handle_elf): Don't translate hash and versym data formats,
---- elfutils/src/elflint.c
-+++ elfutils/src/elflint.c
-@@ -123,6 +123,10 @@ static uint32_t shstrndx;
- /* Array to count references in section groups. */
- static int *scnref;
-
-+/* Numbers of sections and program headers. */
-+static unsigned int shnum;
-+static unsigned int phnum;
-+
-
- int
- main (int argc, char *argv[])
-@@ -311,10 +315,19 @@ section_name (Ebl *ebl, int idx)
- {
- GElf_Shdr shdr_mem;
- GElf_Shdr *shdr;
-+ const char *ret;
-+
-+ if ((unsigned int) idx > shnum)
-+ return "<invalid>";
-
- shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
-+ if (shdr == NULL)
-+ return "<invalid>";
-
-- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-+ if (ret == NULL)
-+ return "<invalid>";
-+ return ret;
- }
-
-
-@@ -337,11 +350,6 @@ static const int valid_e_machine[] =
- (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
-
-
--/* Numbers of sections and program headers. */
--static unsigned int shnum;
--static unsigned int phnum;
--
--
- static void
- check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
- {
-@@ -625,7 +633,8 @@ section [%2d] '%s': symbol table cannot
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
- idx, section_name (ebl, idx));
-@@ -663,7 +672,7 @@ section [%2d] '%s': XINDEX for zeroth en
- xndxscnidx, section_name (ebl, xndxscnidx));
- }
-
-- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
- if (sym == NULL)
-@@ -683,7 +692,8 @@ section [%2d] '%s': symbol %zu: invalid
- else
- {
- name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
-- assert (name != NULL);
-+ assert (name != NULL
-+ || strshdr->sh_type != SHT_STRTAB);
- }
-
- if (sym->st_shndx == SHN_XINDEX)
-@@ -1040,9 +1050,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Shdr rcshdr_mem;
- const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
-- assert (rcshdr != NULL);
-
-- if (rcshdr->sh_type == SHT_DYNAMIC)
-+ if (rcshdr == NULL)
-+ break;
-+
-+ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
- {
- /* Found the dynamic section. Look through it. */
- Elf_Data *d = elf_getdata (scn, NULL);
-@@ -1052,7 +1064,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
-- assert (dyn != NULL);
-+
-+ if (dyn == NULL)
-+ break;
-
- if (dyn->d_tag == DT_RELCOUNT)
- {
-@@ -1066,7 +1080,9 @@ section [%2d] '%s': DT_RELCOUNT used for
- /* Does the number specified number of relative
- relocations exceed the total number of
- relocations? */
-- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
-+ if (shdr->sh_entsize != 0
-+ && dyn->d_un.d_val > (shdr->sh_size
-+ / shdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
- idx, section_name (ebl, idx),
-@@ -1226,7 +1242,8 @@ section [%2d] '%s': no relocations for m
- }
- }
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext (reltype == ELF_T_RELA ? "\
- section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
- section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
-@@ -1449,7 +1466,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rela rela_mem;
- GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
-@@ -1499,7 +1517,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE
- Elf_Data *symdata = elf_getdata (symscn, NULL);
- enum load_state state = state_undecided;
-
-- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Rel rel_mem;
- GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
-@@ -1598,7 +1617,8 @@ section [%2d] '%s': referenced as string
- shdr->sh_link, section_name (ebl, shdr->sh_link),
- idx, section_name (ebl, idx));
-
-- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+ if (shdr->sh_entsize != sh_entsize)
- ERROR (gettext ("\
- section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
- idx, section_name (ebl, idx));
-@@ -1608,7 +1628,7 @@ section [%2d] '%s': section entry size d
- idx, section_name (ebl, idx));
-
- bool non_null_warned = false;
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dyn_mem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
-@@ -1880,6 +1900,8 @@ section [%2d] '%s': entry size does not
- idx, section_name (ebl, idx));
-
- if (symshdr != NULL
-+ && shdr->sh_entsize
-+ && symshdr->sh_entsize
- && (shdr->sh_size / shdr->sh_entsize
- < symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
-@@ -1906,6 +1928,12 @@ section [%2d] '%s': extended section ind
- }
-
- Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
-+ if (data == NULL)
-+ {
-+ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
-+ idx, section_name (ebl, idx));
-+ return;
-+ }
-
- if (*((Elf32_Word *) data->d_buf) != 0)
- ERROR (gettext ("symbol 0 should have zero extended section index\n"));
-@@ -1948,7 +1976,7 @@ section [%2d] '%s': hash table section i
-
- size_t maxidx = nchain;
-
-- if (symshdr != NULL)
-+ if (symshdr != NULL && symshdr->sh_entsize != 0)
- {
- size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
-
-@@ -1959,18 +1987,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf32_Word *buf = (Elf32_Word *) data->d_buf;
-+ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2000,18 +2038,28 @@ section [%2d] '%s': hash table section i
- maxidx = symsize;
- }
-
-+ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
-+ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
- size_t cnt;
- for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
- idx, section_name (ebl, idx), cnt - 2);
-+ }
-
- for (; cnt < 2 + nbucket + nchain; ++cnt)
-- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
-+ {
-+ if (buf + cnt >= end)
-+ break;
-+ else if (buf[cnt] >= maxidx)
- ERROR (gettext ("\
- section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
-- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
-+ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
-+ }
- }
-
-
-@@ -2036,7 +2084,7 @@ section [%2d] '%s': bitmask size not pow
- if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
- {
- ERROR (gettext ("\
--section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
-+section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
- idx, section_name (ebl, idx), (long int) shdr->sh_size,
- (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
- return;
-@@ -2708,8 +2756,9 @@ section [%2d] '%s' refers in sh_link to
-
- /* The number of elements in the version symbol table must be the
- same as the number of symbols. */
-- if (shdr->sh_size / shdr->sh_entsize
-- != symshdr->sh_size / symshdr->sh_entsize)
-+ if (shdr->sh_entsize && symshdr->sh_entsize
-+ && (shdr->sh_size / shdr->sh_entsize
-+ != symshdr->sh_size / symshdr->sh_entsize))
- ERROR (gettext ("\
- section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
- idx, section_name (ebl, idx),
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -1364,6 +1364,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
-
- GElf_Sym sym_mem;
-+ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
-+
- printf ((grpref[0] & GRP_COMDAT)
- ? ngettext ("\
- \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
-@@ -1376,8 +1378,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
- data->d_size / sizeof (Elf32_Word) - 1),
- elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- elf_strptr (ebl->elf, symshdr->sh_link,
-- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
-+ (sym == NULL ? NULL
-+ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
- ?: gettext ("<INVALID SYMBOL>"),
- data->d_size / sizeof (Elf32_Word) - 1);
-
-@@ -1528,10 +1530,12 @@ static void
- handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
- Elf_Data *data;
- size_t cnt;
- size_t shstrndx;
-+ size_t sh_entsize;
-
- /* Get the data of the section. */
- data = elf_getdata (scn, NULL);
-@@ -1543,21 +1547,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-+
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
- \nDynamic segment contains %lu entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
-- shdr->sh_size / shdr->sh_entsize),
-- (unsigned long int) (shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
-+ (unsigned long int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
- fputs_unlocked (gettext (" Type Value\n"), stdout);
-
-- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- GElf_Dyn dynmem;
- GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
-@@ -1706,7 +1715,8 @@ static void
- handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -1892,7 +1902,8 @@ static void
- handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
- {
- int class = gelf_getclass (ebl->elf);
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
-
- /* Get the data of the section. */
- Elf_Data *data = elf_getdata (scn, NULL);
-@@ -2139,6 +2150,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Now we can compute the number of entries in the section. */
- unsigned int nsyms = data->d_size / (class == ELFCLASS32
- ? sizeof (Elf32_Sym)
-@@ -2149,15 +2167,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
- nsyms),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
-- GElf_Shdr glink;
- printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n",
- " %lu local symbols String table: [%2u] '%s'\n",
- shdr->sh_info),
- (unsigned long int) shdr->sh_info,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- fputs_unlocked (class == ELFCLASS32
- ? gettext ("\
-@@ -2393,7 +2408,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- printf (ngettext ("\
- \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2404,9 +2425,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2459,8 +2478,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- error (EXIT_FAILURE, 0,
- gettext ("cannot get section header string table index"));
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- int class = gelf_getclass (ebl->elf);
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2472,9 +2497,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- unsigned int offset = 0;
- for (int cnt = shdr->sh_info; --cnt >= 0; )
-@@ -2736,25 +2759,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
- filename = NULL;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-+ &glink_mem);
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT);
-+ if (glink == NULL)
-+ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+
- /* Print the header. */
-- GElf_Shdr glink;
- printf (ngettext ("\
- \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
- "\
- \nVersion symbols section [%2u] '%s' contains %d entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'",
-- shdr->sh_size / shdr->sh_entsize),
-+ shdr->sh_size / sh_entsize),
- (unsigned int) elf_ndxscn (scn),
- elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-- (int) (shdr->sh_size / shdr->sh_entsize),
-+ (int) (shdr->sh_size / sh_entsize),
- class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- /* Now we can finally look at the actual contents of this section. */
-- for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
-+ for (unsigned int cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
- {
- if (cnt % 2 == 0)
- printf ("\n %4d:", cnt);
-@@ -2803,7 +2831,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
- ++counts[lengths[cnt]];
-
-- GElf_Shdr glink;
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
-+ shdr->sh_link),
-+ &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
- "\
-@@ -2816,9 +2854,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
- shdr->sh_addr,
- shdr->sh_offset,
- (unsigned int) shdr->sh_link,
-- elf_strptr (ebl->elf, shstrndx,
-- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-- &glink)->sh_name));
-+ elf_strptr (ebl->elf, shstrndx, glink->sh_name));
-
- if (extrastr != NULL)
- fputs (extrastr, stdout);
-@@ -3078,7 +3114,8 @@ print_liblist (Ebl *ebl)
-
- if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST)
- {
-- int nentries = shdr->sh_size / shdr->sh_entsize;
-+ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_LIB, 1, EV_CURRENT);
-+ int nentries = shdr->sh_size / sh_entsize;
- printf (ngettext ("\
- \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n",
- "\
-@@ -4398,6 +4435,16 @@ print_decoded_aranges_section (Ebl *ebl,
- return;
- }
-
-+ GElf_Shdr glink_mem;
-+ GElf_Shdr *glink;
-+ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-+ if (glink == NULL)
-+ {
-+ error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-+ elf_ndxscn (scn));
-+ return;
-+ }
-+
- printf (ngettext ("\
- \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
- "\
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
-@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char
- goto fail_close;
- }
-
-+ if (shstrndx >= shnum)
-+ goto illformed;
-+
-+#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
-+
- /* Storage for section information. We leave room for two more
- entries since we unconditionally create a section header string
- table. Maybe some weird tool created an ELF file without one.
-@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* This should always be true (i.e., there should not be any
- holes in the numbering). */
-- assert (elf_ndxscn (scn) == cnt);
-+ elf_assert (elf_ndxscn (scn) == cnt);
-
- shdr_info[cnt].scn = scn;
-
-@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char
- shdr_info[cnt].shdr.sh_name);
- if (shdr_info[cnt].name == NULL)
- {
-+ illformed:
- error (0, 0, gettext ("illformed file '%s'"), fname);
- goto fail_close;
- }
-@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char
-
- /* Remember the shdr.sh_link value. */
- shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
-+ if (shdr_info[cnt].old_sh_link >= shnum)
-+ goto illformed;
-
- /* Sections in files other than relocatable object files which
- are not loaded can be freely moved by us. In relocatable
-@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char
- appropriate reference. */
- if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
-@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char
- for (inner = 1;
- inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
- ++inner)
-+ {
-+ if (grpref[inner] < shnum)
- shdr_info[grpref[inner]].group_idx = cnt;
-+ else
-+ goto illformed;
-+ }
-
- if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
- /* If the section group contains only one element and this
-@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char
- }
- else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
- {
-- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
-+ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
- shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
- }
-
-@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char
- discarded right away. */
- if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
- {
-- assert (shdr_info[cnt].group_idx != 0);
-+ elf_assert (shdr_info[cnt].group_idx != 0);
-
- if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
- {
-@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char
- {
- /* If a relocation section is marked as being removed make
- sure the section it is relocating is removed, too. */
-- if ((shdr_info[cnt].shdr.sh_type == SHT_REL
-+ if (shdr_info[cnt].shdr.sh_type == SHT_REL
- || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-- shdr_info[cnt].idx = 1;
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
-+ shdr_info[cnt].idx = 1;
-+ }
-
- /* If a group section is marked as being removed make
- sure all the sections it contains are being removed, too. */
-@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char
- if (shdr_info[cnt].symtab_idx != 0
- && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
-
- shdr_info[shdr_info[cnt].symtab_idx].data
- = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
-@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char
- else if (scnidx == SHN_XINDEX)
- scnidx = xndx;
-
-+ if (scnidx >= shnum)
-+ goto illformed;
-+
- if (shdr_info[scnidx].idx == 0)
- /* This symbol table has a real symbol in
- a discarded section. So preserve the
-@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char
- }
-
- /* Handle references through sh_info. */
-- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
-- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
-+ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
-+ {
-+ if (shdr_info[cnt].shdr.sh_info >= shnum)
-+ goto illformed;
-+ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
- {
- shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
- changes |= shdr_info[cnt].shdr.sh_info < cnt;
- }
-+ }
-
- /* Mark the section as investigated. */
- shdr_info[cnt].idx = 2;
-@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
- elf_errmsg (-1));
-
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- /* Add this name to the section header string table. */
- shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
-@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
-
- shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
- if (shdr_info[cnt].data == NULL)
-@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char
- error (EXIT_FAILURE, 0,
- gettext ("while create section header section: %s"),
- elf_errmsg (-1));
-- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-+ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
-
- /* Finalize the string table and fill in the correct indices in the
- section headers. */
-@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char
- shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (Elf32_Word))
-+ elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
- if (shdr_info[cnt].version_idx != 0)
- {
-- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
-+ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
- /* This section has associated version
- information. We have to modify that
- information, too. */
- versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
- NULL);
-
-- assert ((versiondata->d_size / sizeof (GElf_Versym))
-+ elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
- >= shdr_info[cnt].data->d_size / elsize);
- }
-
-@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char
- sec = shdr_info[sym->st_shndx].idx;
- else
- {
-- assert (shndxdata != NULL);
-+ elf_assert (shndxdata != NULL);
-
- sec = shdr_info[xshndx].idx;
- }
-@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char
- nxshndx = sec;
- }
-
-- assert (sec < SHN_LORESERVE || shndxdata != NULL);
-+ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
-
- if ((inner != destidx || nshndx != sym->st_shndx
- || (shndxdata != NULL && nxshndx != xshndx))
-@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- size_t sidx = (sym->st_shndx != SHN_XINDEX
- ? sym->st_shndx : xshndx);
-- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-- || (shdr_info[sidx].shdr.sh_type == SHT_GROUP
-- && shdr_info[sidx].shdr.sh_info == inner));
-+ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION
-+ || ((shdr_info[sidx].shdr.sh_type
-+ == SHT_GROUP)
-+ && (shdr_info[sidx].shdr.sh_info
-+ == inner)));
- }
- }
-
-@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
-@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char
- else
- {
- /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
-- assert (shdr_info[cnt].shdr.sh_entsize
-- == sizeof (Elf64_Xword));
-+ elf_assert (shdr_info[cnt].shdr.sh_entsize
-+ == sizeof (Elf64_Xword));
-
- Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
-
-@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char
- {
- GElf_Sym sym_mem;
- GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-- assert (sym != NULL);
-+ elf_assert (sym != NULL);
-
- const char *name = elf_strptr (elf, strshndx,
- sym->st_name);
-- assert (name != NULL);
-+ elf_assert (name != NULL);
- size_t hidx = elf_hash (name) % nbucket;
-
- if (bucket[hidx] == 0)
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
deleted file mode 100644
index 870ec23703..0000000000
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch
+++ /dev/null
@@ -1,256 +0,0 @@
-From 02cefdaa6429e620d6457fdb3ad9934f194c5a93 Mon Sep 17 00:00:00 2001
-From: Kurt Roeckx <kurt@roeckx.be>
-Date: Tue, 22 Apr 2014 21:46:22 +0200
-Subject: [PATCH] Unwinding is only supported on Linux
-
-Index: elfutils-0.158/backends/i386_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/i386_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/i386_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#if !defined __i386__ && !defined __x86_64__
-+#if (!defined __i386__ && !defined __x86_64__) || !defined(__linux__)
- return false;
- #else /* __i386__ || __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/backends/x86_64_initreg.c
-===================================================================
---- elfutils-0.158.orig/backends/x86_64_initreg.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/backends/x86_64_initreg.c 2014-05-01 17:11:18.866616384 +0000
-@@ -44,7 +44,7 @@
- ebl_tid_registers_t *setfunc __attribute__ ((unused)),
- void *arg __attribute__ ((unused)))
- {
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
- return false;
- #else /* __x86_64__ */
- struct user_regs_struct user_regs;
-Index: elfutils-0.158/libdwfl/linux-pid-attach.c
-===================================================================
---- elfutils-0.158.orig/libdwfl/linux-pid-attach.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/libdwfl/linux-pid-attach.c 2014-05-01 17:12:47.980766442 +0000
-@@ -37,6 +37,8 @@
- # define MAX(a, b) ((a) > (b) ? (a) : (b))
- #endif
-
-+#ifdef __linux__
-+
- struct pid_arg
- {
- DIR *dir;
-@@ -358,3 +360,87 @@
- return 0;
- }
- INTDEF (dwfl_linux_proc_attach)
-+
-+#else /* __linux__ */
-+
-+static pid_t
-+pid_next_thread (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return -1;
-+}
-+
-+static bool
-+pid_getthread (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t tid __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)),
-+ void **thread_argp __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
-+ Dwarf_Addr addr __attribute__ ((unused)),
-+ Dwarf_Word *result __attribute__ ((unused)),
-+ void *arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static bool
-+pid_set_initial_registers (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+ errno = ENOSYS;
-+ __libdwfl_seterrno (DWFL_E_ERRNO);
-+ return false;
-+}
-+
-+static void
-+pid_detach (Dwfl *dwfl __attribute__ ((unused)),
-+ void *dwfl_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static void
-+pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
-+ void *thread_arg __attribute__ ((unused)))
-+{
-+}
-+
-+static const Dwfl_Thread_Callbacks pid_thread_callbacks =
-+{
-+ pid_next_thread,
-+ pid_getthread,
-+ pid_memory_read,
-+ pid_set_initial_registers,
-+ pid_detach,
-+ pid_thread_detach,
-+};
-+
-+int
-+dwfl_linux_proc_attach (Dwfl *dwfl __attribute__ ((unused)),
-+ pid_t pid __attribute__ ((unused)),
-+ bool assume_ptrace_stopped __attribute__ ((unused)))
-+{
-+ return ENOSYS;
-+}
-+INTDEF (dwfl_linux_proc_attach)
-+
-+struct __libdwfl_pid_arg *
-+internal_function
-+__libdwfl_get_pid_arg (Dwfl *dwfl __attribute__ ((unused)))
-+{
-+ return NULL;
-+}
-+
-+#endif /* ! __linux __ */
-+
-Index: elfutils-0.158/tests/backtrace-child.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-child.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-child.c 2014-05-01 17:11:18.866616384 +0000
-@@ -79,6 +79,18 @@
- #include <stdio.h>
- #include <unistd.h>
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
- #define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
- #else
-@@ -221,3 +233,6 @@
- /* Not reached. */
- abort ();
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-data.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-data.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-data.c 2014-05-01 17:11:18.866616384 +0000
-@@ -40,7 +40,7 @@
- #include <string.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#ifndef __x86_64__
-+#if !defined(__x86_64__) || !defined(__linux__)
-
- int
- main (int argc __attribute__ ((unused)), char **argv)
-@@ -50,7 +50,7 @@
- return 77;
- }
-
--#else /* __x86_64__ */
-+#else /* __x86_64__ && __linux__ */
-
- /* The only arch specific code is set_initial_registers. */
-
-Index: elfutils-0.158/tests/backtrace-dwarf.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-dwarf.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-dwarf.c 2014-05-01 17:11:18.866616384 +0000
-@@ -25,6 +25,18 @@
- #include <sys/ptrace.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static void cleanup_13_abort (void);
- #define main cleanup_13_main
- #include "cleanup-13.c"
-@@ -148,3 +160,6 @@
- /* There is an exit (0) call if we find the "main" frame, */
- error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
- }
-+
-+#endif /* ! __linux__ */
-+
-Index: elfutils-0.158/tests/backtrace-subr.sh
-===================================================================
---- elfutils-0.158.orig/tests/backtrace-subr.sh 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace-subr.sh 2014-05-01 17:11:18.866616384 +0000
-@@ -84,6 +84,7 @@
- echo ./backtrace ./backtrace.$arch.{exec,core}
- testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true
- cat backtrace.$arch.{bt,err}
-+ check_unsupported backtrace.$arch.err backtrace.$arch.core
- check_all backtrace.$arch.{bt,err} backtrace.$arch.core
- }
-
-Index: elfutils-0.158/tests/backtrace.c
-===================================================================
---- elfutils-0.158.orig/tests/backtrace.c 2014-05-01 17:11:18.870616302 +0000
-+++ elfutils-0.158/tests/backtrace.c 2014-05-01 17:11:18.866616384 +0000
-@@ -39,6 +39,18 @@
- #include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
-+#ifndef __linux__
-+
-+int
-+main (int argc __attribute__ ((unused)), char **argv)
-+{
-+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
-+ argv[0]);
-+ return 77;
-+}
-+
-+#else /* __linux__ */
-+
- static int
- dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
- const char *name, Dwarf_Addr start,
-@@ -452,3 +464,6 @@
- dwfl_end (dwfl);
- return 0;
- }
-+
-+#endif /* ! __linux__ */
-+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
new file mode 100644
index 0000000000..3754c1c361
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
@@ -0,0 +1,35 @@
+From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Fri, 10 Apr 2015 00:29:18 +0200
+Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false
+ positive
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libelf/elf_getarsym.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
+index d0bb28a..08954d2 100644
+--- a/libelf/elf_getarsym.c
++++ b/libelf/elf_getarsym.c
+@@ -165,8 +165,13 @@ elf_getarsym (elf, ptr)
+ int w = index64_p ? 8 : 4;
+
+ /* We have an archive. The first word in there is the number of
+- entries in the table. */
+- uint64_t n;
++ entries in the table.
++ Set to SIZE_MAX just to silence -Werror=maybe-uninitialized
++ elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function
++ The read_number_entries function doesn't initialize n only when returning
++ -1 which in turn ensures to jump over usage of this uninitialized variable.
++ */
++ uint64_t n = SIZE_MAX;
+ size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
+ if (read_number_entries (&n, elf, &off, index64_p) < 0)
+ {
+--
+2.3.5
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
index fc3d6dc3f4..c97c4e470d 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_backend.diff
@@ -1,7 +1,25 @@
-Index: elfutils-0.158/backends/arm_init.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_init.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_init.c 2014-04-21 11:13:24.374519343 +0000
+From 0db1687eee0b4d16ccbc40db5a06b574fca6614c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 14 Nov 2014 15:25:42 +0800
+Subject: [PATCH] Rebase arm_backend.diff from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 18 ++++-
+ backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
+ backends/arm_retval.c | 44 +++++++++++-
+ backends/libebl_arm.h | 9 +++
+ libelf/elf.h | 11 +++
+ tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
+ tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
+ tests/run-readelf-mixed-corenote.sh | 11 ++-
+ 8 files changed, 401 insertions(+), 12 deletions(-)
+ create mode 100644 backends/libebl_arm.h
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 3283c97..8b57d3f 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
@@ -35,21 +35,32 @@
#define RELOC_PREFIX R_ARM_
#include "libebl_CPU.h"
@@ -36,7 +54,7 @@ Index: elfutils-0.158/backends/arm_init.c
/* We handle it. */
eh->name = "ARM";
arm_init_reloc (eh);
-@@ -61,7 +72,10 @@
+@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen)
HOOK (eh, core_note);
HOOK (eh, auxv_info);
HOOK (eh, check_object_attribute);
@@ -46,12 +64,12 @@ Index: elfutils-0.158/backends/arm_init.c
+ else
+ eh->return_value_location = arm_return_value_location_hard;
HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
- return MODVERSION;
-Index: elfutils-0.158/backends/arm_regs.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_regs.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_regs.c 2014-04-21 11:13:24.374519343 +0000
+diff --git a/backends/arm_regs.c b/backends/arm_regs.c
+index 21c5ad3..4ee1039 100644
+--- a/backends/arm_regs.c
++++ b/backends/arm_regs.c
@@ -31,6 +31,7 @@
#endif
@@ -60,7 +78,7 @@ Index: elfutils-0.158/backends/arm_regs.c
#include <dwarf.h>
#define BACKEND arm_
-@@ -76,6 +77,9 @@
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
break;
case 16 + 0 ... 16 + 7:
@@ -70,7 +88,7 @@ Index: elfutils-0.158/backends/arm_regs.c
regno += 96 - 16;
/* Fall through. */
case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
namelen = 2;
break;
@@ -210,11 +228,11 @@ Index: elfutils-0.158/backends/arm_regs.c
*setname = "VFP";
*type = DW_ATE_float;
*bits = 64;
-Index: elfutils-0.158/backends/arm_retval.c
-===================================================================
---- elfutils-0.158.orig/backends/arm_retval.c 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/backends/arm_retval.c 2014-04-21 11:13:24.374519343 +0000
-@@ -48,6 +48,13 @@
+diff --git a/backends/arm_retval.c b/backends/arm_retval.c
+index 7aced74..052132e 100644
+--- a/backends/arm_retval.c
++++ b/backends/arm_retval.c
+@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
#define nloc_intreg 1
#define nloc_intregs(n) (2 * (n))
@@ -228,7 +246,7 @@ Index: elfutils-0.158/backends/arm_retval.c
/* The return value is a structure and is actually stored in stack space
passed in a hidden argument by the caller. But, the compiler
helpfully returns the address of that space in r0. */
-@@ -58,8 +65,9 @@
+@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] =
#define nloc_aggregate 1
@@ -240,11 +258,11 @@ Index: elfutils-0.158/backends/arm_retval.c
{
/* Start with the function's type, and get the DW_AT_type attribute,
which is the type of the return value. */
-@@ -112,14 +120,31 @@
- else
- return -1;
- }
-+ if (tag == DW_TAG_base_type)
+@@ -98,14 +106,31 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ else
+ return -1;
+ }
++ if (tag == DW_TAG_base_type)
+ {
+ Dwarf_Word encoding;
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
@@ -259,20 +277,20 @@ Index: elfutils-0.158/backends/arm_retval.c
+ goto aggregate;
+ }
+ }
- if (size <= 16)
- {
- intreg:
- *locp = loc_intreg;
- return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
- }
-+ /* fall through. */
+ if (size <= 16)
+ {
+ intreg:
+ *locp = loc_intreg;
+ return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
+ }
++ /* fall through. */
- aggregate:
-+ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
- *locp = loc_aggregate;
- return nloc_aggregate;
-
-@@ -138,3 +163,18 @@
+ aggregate:
++ /* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ *locp = loc_aggregate;
+ return nloc_aggregate;
+ }
+@@ -125,3 +150,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
DWARF and might be valid. */
return -2;
}
@@ -291,11 +309,26 @@ Index: elfutils-0.158/backends/arm_retval.c
+ return arm_return_value_location_ (functypedie, locp, 0);
+}
+
-Index: elfutils-0.158/libelf/elf.h
-===================================================================
---- elfutils-0.158.orig/libelf/elf.h 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/libelf/elf.h 2014-04-21 11:13:24.374519343 +0000
-@@ -2318,6 +2318,9 @@
+diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
+new file mode 100644
+index 0000000..c00770c
+--- /dev/null
++++ b/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+diff --git a/libelf/elf.h b/libelf/elf.h
+index a3cce3e..0891674 100644
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -2346,6 +2346,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000
@@ -305,7 +338,7 @@ Index: elfutils-0.158/libelf/elf.h
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-@@ -2335,12 +2338,19 @@
+@@ -2363,12 +2366,19 @@ typedef Elf32_Addr Elf32_Conflict;
/* Processor specific values for the Phdr p_type field. */
#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -325,7 +358,7 @@ Index: elfutils-0.158/libelf/elf.h
/* AArch64 relocs. */
-@@ -2619,6 +2629,7 @@
+@@ -2647,6 +2657,7 @@ typedef Elf32_Addr Elf32_Conflict;
TLS block (LDR, STR). */
#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
to GOT origin (LDR). */
@@ -333,25 +366,122 @@ Index: elfutils-0.158/libelf/elf.h
#define R_ARM_ME_TOO 128 /* Obsolete. */
#define R_ARM_THM_TLS_DESCSEQ 129
#define R_ARM_THM_TLS_DESCSEQ16 129
-Index: elfutils-0.158/backends/libebl_arm.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/libebl_arm.h 2014-04-21 11:13:24.374519343 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.158/tests/run-allregs.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-allregs.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2671,7 +2671,28 @@
+diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
+index 5d33246..78464a8 100755
+--- a/tests/run-addrcfi.sh
++++ b/tests/run-addrcfi.sh
+@@ -2530,6 +2530,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg21 (f5): undefined
+ FPA reg22 (f6): undefined
+ FPA reg23 (f7): undefined
++ VFP reg64 (s0): undefined
++ VFP reg65 (s1): undefined
++ VFP reg66 (s2): undefined
++ VFP reg67 (s3): undefined
++ VFP reg68 (s4): undefined
++ VFP reg69 (s5): undefined
++ VFP reg70 (s6): undefined
++ VFP reg71 (s7): undefined
++ VFP reg72 (s8): undefined
++ VFP reg73 (s9): undefined
++ VFP reg74 (s10): undefined
++ VFP reg75 (s11): undefined
++ VFP reg76 (s12): undefined
++ VFP reg77 (s13): undefined
++ VFP reg78 (s14): undefined
++ VFP reg79 (s15): undefined
++ VFP reg80 (s16): undefined
++ VFP reg81 (s17): undefined
++ VFP reg82 (s18): undefined
++ VFP reg83 (s19): undefined
++ VFP reg84 (s20): undefined
++ VFP reg85 (s21): undefined
++ VFP reg86 (s22): undefined
++ VFP reg87 (s23): undefined
++ VFP reg88 (s24): undefined
++ VFP reg89 (s25): undefined
++ VFP reg90 (s26): undefined
++ VFP reg91 (s27): undefined
++ VFP reg92 (s28): undefined
++ VFP reg93 (s29): undefined
++ VFP reg94 (s30): undefined
++ VFP reg95 (s31): undefined
+ FPA reg96 (f0): undefined
+ FPA reg97 (f1): undefined
+ FPA reg98 (f2): undefined
+@@ -2538,7 +2570,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
+ FPA reg101 (f5): undefined
+ FPA reg102 (f6): undefined
+ FPA reg103 (f7): undefined
+- integer reg128 (spsr): undefined
++ MMX reg104 (wcgr0): undefined
++ MMX reg105 (wcgr1): undefined
++ MMX reg106 (wcgr2): undefined
++ MMX reg107 (wcgr3): undefined
++ MMX reg108 (wcgr4): undefined
++ MMX reg109 (wcgr5): undefined
++ MMX reg110 (wcgr6): undefined
++ MMX reg111 (wcgr7): undefined
++ MMX reg112 (wr0): undefined
++ MMX reg113 (wr1): undefined
++ MMX reg114 (wr2): undefined
++ MMX reg115 (wr3): undefined
++ MMX reg116 (wr4): undefined
++ MMX reg117 (wr5): undefined
++ MMX reg118 (wr6): undefined
++ MMX reg119 (wr7): undefined
++ MMX reg120 (wr8): undefined
++ MMX reg121 (wr9): undefined
++ MMX reg122 (wr10): undefined
++ MMX reg123 (wr11): undefined
++ MMX reg124 (wr12): undefined
++ MMX reg125 (wr13): undefined
++ MMX reg126 (wr14): undefined
++ MMX reg127 (wr15): undefined
++ state reg128 (spsr): undefined
++ state reg129 (spsr_fiq): undefined
++ state reg130 (spsr_irq): undefined
++ state reg131 (spsr_abt): undefined
++ state reg132 (spsr_und): undefined
++ state reg133 (spsr_svc): undefined
++ integer reg144 (r8_usr): undefined
++ integer reg145 (r9_usr): undefined
++ integer reg146 (r10_usr): undefined
++ integer reg147 (r11_usr): undefined
++ integer reg148 (r12_usr): undefined
++ integer reg149 (r13_usr): undefined
++ integer reg150 (r14_usr): undefined
++ integer reg151 (r8_fiq): undefined
++ integer reg152 (r9_fiq): undefined
++ integer reg153 (r10_fiq): undefined
++ integer reg154 (r11_fiq): undefined
++ integer reg155 (r12_fiq): undefined
++ integer reg156 (r13_fiq): undefined
++ integer reg157 (r14_fiq): undefined
++ integer reg158 (r13_irq): undefined
++ integer reg159 (r14_irq): undefined
++ integer reg160 (r13_abt): undefined
++ integer reg161 (r14_abt): undefined
++ integer reg162 (r13_und): undefined
++ integer reg163 (r14_und): undefined
++ integer reg164 (r13_svc): undefined
++ integer reg165 (r14_svc): undefined
++ MMX reg192 (wc0): undefined
++ MMX reg193 (wc1): undefined
++ MMX reg194 (wc2): undefined
++ MMX reg195 (wc3): undefined
++ MMX reg196 (wc4): undefined
++ MMX reg197 (wc5): undefined
++ MMX reg198 (wc6): undefined
++ MMX reg199 (wc7): undefined
+ VFP reg256 (d0): undefined
+ VFP reg257 (d1): undefined
+ VFP reg258 (d2): undefined
+diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
+index 6f3862e..13557d5 100755
+--- a/tests/run-allregs.sh
++++ b/tests/run-allregs.sh
+@@ -2671,7 +2671,28 @@ integer registers:
13: sp (sp), address 32 bits
14: lr (lr), address 32 bits
15: pc (pc), address 32 bits
@@ -381,7 +511,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
FPA registers:
16: f0 (f0), float 96 bits
17: f1 (f1), float 96 bits
-@@ -2689,7 +2710,72 @@
+@@ -2689,7 +2710,72 @@ FPA registers:
101: f5 (f5), float 96 bits
102: f6 (f6), float 96 bits
103: f7 (f7), float 96 bits
@@ -454,7 +584,7 @@ Index: elfutils-0.158/tests/run-allregs.sh
256: d0 (d0), float 64 bits
257: d1 (d1), float 64 bits
258: d2 (d2), float 64 bits
-@@ -2722,6 +2808,13 @@
+@@ -2722,6 +2808,13 @@ VFP registers:
285: d29 (d29), float 64 bits
286: d30 (d30), float 64 bits
287: d31 (d31), float 64 bits
@@ -468,11 +598,11 @@ Index: elfutils-0.158/tests/run-allregs.sh
EOF
# See run-readelf-mixed-corenote.sh for instructions to regenerate
-Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-readelf-mixed-corenote.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -30,12 +30,11 @@
+diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
+index 01e4594..9a8a380 100755
+--- a/tests/run-readelf-mixed-corenote.sh
++++ b/tests/run-readelf-mixed-corenote.sh
+@@ -30,12 +30,11 @@ Note segment of 892 bytes at offset 0x274:
pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
orig_r0: -1, fpvalid: 1
@@ -490,114 +620,6 @@ Index: elfutils-0.158/tests/run-readelf-mixed-corenote.sh
CORE 124 PRPSINFO
state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-Index: elfutils-0.158/tests/run-addrcfi.sh
-===================================================================
---- elfutils-0.158.orig/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-+++ elfutils-0.158/tests/run-addrcfi.sh 2014-04-21 11:13:24.378519252 +0000
-@@ -2530,6 +2530,38 @@
- FPA reg21 (f5): undefined
- FPA reg22 (f6): undefined
- FPA reg23 (f7): undefined
-+ VFP reg64 (s0): undefined
-+ VFP reg65 (s1): undefined
-+ VFP reg66 (s2): undefined
-+ VFP reg67 (s3): undefined
-+ VFP reg68 (s4): undefined
-+ VFP reg69 (s5): undefined
-+ VFP reg70 (s6): undefined
-+ VFP reg71 (s7): undefined
-+ VFP reg72 (s8): undefined
-+ VFP reg73 (s9): undefined
-+ VFP reg74 (s10): undefined
-+ VFP reg75 (s11): undefined
-+ VFP reg76 (s12): undefined
-+ VFP reg77 (s13): undefined
-+ VFP reg78 (s14): undefined
-+ VFP reg79 (s15): undefined
-+ VFP reg80 (s16): undefined
-+ VFP reg81 (s17): undefined
-+ VFP reg82 (s18): undefined
-+ VFP reg83 (s19): undefined
-+ VFP reg84 (s20): undefined
-+ VFP reg85 (s21): undefined
-+ VFP reg86 (s22): undefined
-+ VFP reg87 (s23): undefined
-+ VFP reg88 (s24): undefined
-+ VFP reg89 (s25): undefined
-+ VFP reg90 (s26): undefined
-+ VFP reg91 (s27): undefined
-+ VFP reg92 (s28): undefined
-+ VFP reg93 (s29): undefined
-+ VFP reg94 (s30): undefined
-+ VFP reg95 (s31): undefined
- FPA reg96 (f0): undefined
- FPA reg97 (f1): undefined
- FPA reg98 (f2): undefined
-@@ -2538,7 +2570,66 @@
- FPA reg101 (f5): undefined
- FPA reg102 (f6): undefined
- FPA reg103 (f7): undefined
-- integer reg128 (spsr): undefined
-+ MMX reg104 (wcgr0): undefined
-+ MMX reg105 (wcgr1): undefined
-+ MMX reg106 (wcgr2): undefined
-+ MMX reg107 (wcgr3): undefined
-+ MMX reg108 (wcgr4): undefined
-+ MMX reg109 (wcgr5): undefined
-+ MMX reg110 (wcgr6): undefined
-+ MMX reg111 (wcgr7): undefined
-+ MMX reg112 (wr0): undefined
-+ MMX reg113 (wr1): undefined
-+ MMX reg114 (wr2): undefined
-+ MMX reg115 (wr3): undefined
-+ MMX reg116 (wr4): undefined
-+ MMX reg117 (wr5): undefined
-+ MMX reg118 (wr6): undefined
-+ MMX reg119 (wr7): undefined
-+ MMX reg120 (wr8): undefined
-+ MMX reg121 (wr9): undefined
-+ MMX reg122 (wr10): undefined
-+ MMX reg123 (wr11): undefined
-+ MMX reg124 (wr12): undefined
-+ MMX reg125 (wr13): undefined
-+ MMX reg126 (wr14): undefined
-+ MMX reg127 (wr15): undefined
-+ state reg128 (spsr): undefined
-+ state reg129 (spsr_fiq): undefined
-+ state reg130 (spsr_irq): undefined
-+ state reg131 (spsr_abt): undefined
-+ state reg132 (spsr_und): undefined
-+ state reg133 (spsr_svc): undefined
-+ integer reg144 (r8_usr): undefined
-+ integer reg145 (r9_usr): undefined
-+ integer reg146 (r10_usr): undefined
-+ integer reg147 (r11_usr): undefined
-+ integer reg148 (r12_usr): undefined
-+ integer reg149 (r13_usr): undefined
-+ integer reg150 (r14_usr): undefined
-+ integer reg151 (r8_fiq): undefined
-+ integer reg152 (r9_fiq): undefined
-+ integer reg153 (r10_fiq): undefined
-+ integer reg154 (r11_fiq): undefined
-+ integer reg155 (r12_fiq): undefined
-+ integer reg156 (r13_fiq): undefined
-+ integer reg157 (r14_fiq): undefined
-+ integer reg158 (r13_irq): undefined
-+ integer reg159 (r14_irq): undefined
-+ integer reg160 (r13_abt): undefined
-+ integer reg161 (r14_abt): undefined
-+ integer reg162 (r13_und): undefined
-+ integer reg163 (r14_und): undefined
-+ integer reg164 (r13_svc): undefined
-+ integer reg165 (r14_svc): undefined
-+ MMX reg192 (wc0): undefined
-+ MMX reg193 (wc1): undefined
-+ MMX reg194 (wc2): undefined
-+ MMX reg195 (wc3): undefined
-+ MMX reg196 (wc4): undefined
-+ MMX reg197 (wc5): undefined
-+ MMX reg198 (wc6): undefined
-+ MMX reg199 (wc7): undefined
- VFP reg256 (d0): undefined
- VFP reg257 (d1): undefined
- VFP reg258 (d2): undefined
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
new file mode 100644
index 0000000000..eeb2063807
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_func_value.patch
@@ -0,0 +1,166 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 11:30:35 +0200
+Subject: libebl: Add sym_func_value hook.
+
+The ARM EABI says that the zero bit of function symbol st_value indicates
+whether the symbol points to a THUMB or ARM function. Add a new ebl hook
+to adjust the st_value in such a case so that we get the actual value that
+the symbol points to. It isn't easily possible to reuse the existing
+resolve_sym_value for this purpose, so we end up with another hook that
+can be used from dwfl_module_getsym and elflint.
+
+Rebase arm_func_value.patch from 0.159 to 0.160
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 1 +
+ backends/arm_symbol.c | 8 ++++++++
+ libdwfl/dwfl_module_getsym.c | 2 +-
+ libebl/Makefile.am | 3 ++-
+ libebl/ebl-hooks.h | 3 +++
+ libebl/eblsymfuncval.c | 43 +++++++++++++++++++++++++++++++++++++++++++
+ libebl/libebl.h | 11 +++++++++++
+ 7 files changed, 69 insertions(+), 2 deletions(-)
+ create mode 100644 libebl/eblsymfuncval.c
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 8b57d3f..2266829 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -78,6 +78,7 @@ arm_init (elf, machine, eh, ehlen)
+ eh->return_value_location = arm_return_value_location_hard;
+ HOOK (eh, abi_cfi);
+ HOOK (eh, check_reloc_target_type);
++ HOOK (eh, sym_func_value);
+
+ /* We only unwind the core integer registers. */
+ eh->frame_nregs = 16;
+diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
+index cd467ff..49fca55 100644
+--- a/backends/arm_symbol.c
++++ b/backends/arm_symbol.c
+@@ -129,3 +129,11 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty
+ {
+ return sh_type == SHT_ARM_EXIDX;
+ }
++
++/* ARM EABI says that the low bit indicates whether the function
++ symbol value is a THUMB function or not. Mask it off. */
++GElf_Addr
++arm_sym_func_value (Ebl *ebl __attribute__ ((unused)), GElf_Addr val)
++{
++ return val & ~(GElf_Addr)1;
++}
+diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
+index 42d2b67..fb192d7 100644
+--- a/libdwfl/dwfl_module_getsym.c
++++ b/libdwfl/dwfl_module_getsym.c
+@@ -119,7 +119,7 @@ __libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, GElf_Addr *addr,
+ descriptors). */
+
+ char *ident;
+- GElf_Addr st_value = sym->st_value & ebl_func_addr_mask (mod->ebl);
++ GElf_Addr st_value = ebl_sym_func_value (mod->ebl, sym->st_value);
+ *resolved = false;
+ if (! adjust_st_value && mod->e_type != ET_REL && alloc
+ && (GELF_ST_TYPE (sym->st_info) == STT_FUNC
+diff --git a/libebl/Makefile.am b/libebl/Makefile.am
+index ec4477b..889c21b 100644
+--- a/libebl/Makefile.am
++++ b/libebl/Makefile.am
+@@ -55,7 +55,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
+ eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
+ ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
+ eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \
+- eblunwind.c eblresolvesym.c eblcheckreloctargettype.c
++ eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
++ eblsymfuncval.c
+
+ libebl_a_SOURCES = $(gen_SOURCES)
+
+diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
+index e1186f8..160a821 100644
+--- a/libebl/ebl-hooks.h
++++ b/libebl/ebl-hooks.h
+@@ -191,5 +191,8 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ (e.g. function descriptor resolving) */
+ bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr);
+
++/* Returns the real value of a symbol function address or offset. */
++GElf_Addr EBLHOOK(sym_func_value) (Ebl *ebl, GElf_Addr val);
++
+ /* Destructor for ELF backend handle. */
+ void EBLHOOK(destr) (struct ebl *);
+diff --git a/libebl/eblsymfuncval.c b/libebl/eblsymfuncval.c
+new file mode 100644
+index 0000000..c0b322f
+--- /dev/null
++++ b/libebl/eblsymfuncval.c
+@@ -0,0 +1,43 @@
++/* Turn a symbol function value into a real function address or offset.
++ Copyright (C) 2014 Red Hat, Inc.
++ This file is part of elfutils.
++
++ This file is free software; you can redistribute it and/or modify
++ it under the terms of either
++
++ * the GNU Lesser General Public License as published by the Free
++ Software Foundation; either version 3 of the License, or (at
++ your option) any later version
++
++ or
++
++ * 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
++
++ or both in parallel, as here.
++
++ elfutils 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 copies of the GNU General Public License and
++ the GNU Lesser General Public License along with this program. If
++ not, see <http://www.gnu.org/licenses/>. */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <libeblP.h>
++#include <assert.h>
++
++GElf_Addr
++ebl_sym_func_value (Ebl *ebl, GElf_Addr val)
++{
++ if (ebl == NULL || ebl->sym_func_value == NULL)
++ return val;
++
++ return ebl->sym_func_value (ebl, val);
++}
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index bb993bf..40cf635 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -459,6 +459,17 @@ extern bool ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
+ extern bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
+ __nonnull_attribute__ (2);
+
++/* Returns the real value of a symbol function address or offset
++ (e.g. when the st_value contains some flag bits that need to be
++ masked off). This is different from ebl_resolve_sym_value which
++ only works for actual symbol addresses (in non-ET_REL files) that
++ might resolve to an address in a different section.
++ ebl_sym_func_value is called to turn the given value into the a
++ real address or offset (the original value might not be a real
++ address). This works for both ET_REL when the value is a section
++ offset or ET_EXEC or ET_DYN symbol values, which are addresses. */
++extern GElf_Addr ebl_sym_func_value (Ebl *ebl, GElf_Addr val);
++
+ #ifdef __cplusplus
+ }
+ #endif
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
new file mode 100644
index 0000000000..8abb36bb49
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/arm_unwind_ret_mask.patch
@@ -0,0 +1,83 @@
+From: Mark Wielaard <mjw@redhat.com>
+Date: Sun, 15 Jun 2014 12:30:02 +0200
+Subject: libebl: Add ebl_unwind_ret_mask.
+
+Another ARM oddity. A return value address in an unwind will contain an
+extra bit to indicate whether to return to a regular ARM or THUMB function.
+Add a new ebl function to return a mask to use to get the actual return
+address during an unwind ebl_unwind_ret_mask.
+
+Rebase arm_unwind_ret_mask.patch from 0.159 to 0.160
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ backends/arm_init.c | 3 +++
+ libebl/eblinitreg.c | 8 ++++++++
+ libebl/libebl.h | 4 ++++
+ libebl/libeblP.h | 6 ++++++
+ 4 files changed, 21 insertions(+)
+
+diff --git a/backends/arm_init.c b/backends/arm_init.c
+index 2266829..f8df042 100644
+--- a/backends/arm_init.c
++++ b/backends/arm_init.c
+@@ -87,5 +87,8 @@ arm_init (elf, machine, eh, ehlen)
+ /* Bit zero encodes whether an function address is THUMB or ARM. */
+ eh->func_addr_mask = ~(GElf_Addr)1;
+
++ /* Bit zero encodes whether to return to a THUMB or ARM function. */
++ eh->unwind_ret_mask = ~(GElf_Addr)1;
++
+ return MODVERSION;
+ }
+diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c
+index 5729b3c..ca681c0 100644
+--- a/libebl/eblinitreg.c
++++ b/libebl/eblinitreg.c
+@@ -56,3 +56,11 @@ ebl_func_addr_mask (Ebl *ebl)
+ return ((ebl == NULL || ebl->func_addr_mask == 0)
+ ? ~(GElf_Addr)0 : ebl->func_addr_mask);
+ }
++
++GElf_Addr
++ebl_unwind_ret_mask (Ebl *ebl)
++{
++ return ((ebl == NULL || ebl->unwind_ret_mask == 0)
++ ? ~(GElf_Addr)0 : ebl->unwind_ret_mask);
++}
++
+diff --git a/libebl/libebl.h b/libebl/libebl.h
+index 40cf635..be70027 100644
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -420,6 +420,10 @@ extern size_t ebl_frame_nregs (Ebl *ebl)
+ tables) is needed. */
+ extern GElf_Addr ebl_func_addr_mask (Ebl *ebl);
+
++/* Mask to use for unwind return address in case the architecture adds
++ some extra non-address bits to it. */
++extern GElf_Addr ebl_unwind_ret_mask (Ebl *ebl);
++
+ /* Convert *REGNO as is in DWARF to a lower range suitable for
+ Dwarf_Frame->REGS indexing. */
+ extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
+diff --git a/libebl/libeblP.h b/libebl/libeblP.h
+index dbd67f3..e18ace6 100644
+--- a/libebl/libeblP.h
++++ b/libebl/libeblP.h
+@@ -70,6 +70,12 @@ struct ebl
+ otherwise it should be the actual mask to use. */
+ GElf_Addr func_addr_mask;
+
++ /* Mask to use to get the return address from an unwind in case the
++ architecture adds some extra non-address bits to it. When not
++ initialized (0) then ebl_unwind_ret_mask will return ~0, otherwise
++ it should be the actual mask to use. */
++ GElf_Addr unwind_ret_mask;
++
+ /* Function descriptor load address and table as used by
+ ebl_resolve_sym_value if available for this arch. */
+ GElf_Addr fd_addr;
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
index 8796e9a394..8796e9a394 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/fixheadercheck.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
index 6c19d176e0..d51a720073 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/hppa_backend.diff
@@ -478,7 +478,7 @@ Index: elfutils-0.158/backends/parisc_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
index 48bffdad0c..f5b566f2d5 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/m68k_backend.diff
@@ -409,7 +409,7 @@ Index: elfutils-0.158/backends/m68k_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
index b188927a0b..d73a3f2869 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_backend.diff
@@ -496,7 +496,7 @@ Index: elfutils-0.158/backends/mips_retval.c
+ /* Follow typedefs and qualifiers to get to the actual type. */
+ while (tag == DW_TAG_typedef
+ || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+ || tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
++ || tag == DW_TAG_restrict_type)
+ {
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
+ typedie = dwarf_formref_die (attr, &die_mem);
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
index 8e669e7199..8e669e7199 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/mips_readelf_w.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
new file mode 100644
index 0000000000..35b1b389fb
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/non_linux.patch
@@ -0,0 +1,35 @@
+Index: elfutils-0.159/libdwfl/linux-pid-attach.c
+===================================================================
+--- elfutils-0.159.orig/libdwfl/linux-pid-attach.c
++++ elfutils-0.159/libdwfl/linux-pid-attach.c
+@@ -393,6 +393,16 @@ pid_getthread (Dwfl *dwfl __attribute__
+ return false;
+ }
+
++bool
++internal_function
++__libdwfl_ptrace_attach (pid_t tid __attribute__ ((unused)),
++ bool *tid_was_stoppedp __attribute__ ((unused)))
++{
++ errno = ENOSYS;
++ __libdwfl_seterrno (DWFL_E_ERRNO);
++ return false;
++}
++
+ static bool
+ pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
+ Dwarf_Addr addr __attribute__ ((unused)),
+@@ -419,6 +429,13 @@ pid_detach (Dwfl *dwfl __attribute__ ((u
+ {
+ }
+
++void
++internal_function
++__libdwfl_ptrace_detach (pid_t tid __attribute__ ((unused)),
++ bool tid_was_stopped __attribute__ ((unused)))
++{
++}
++
+ static void
+ pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
+ void *thread_arg __attribute__ ((unused)))
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
index 5a75375690..08f25a53eb 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/redhat-portability.diff
@@ -1,52 +1,47 @@
---- elfutils/backends/ChangeLog
-+++ elfutils/backends/ChangeLog
-@@ -292,6 +292,10 @@
- * ppc_attrs.c (ppc_check_object_attribute): Handle tag
- GNU_Power_ABI_Struct_Return.
-
-+2009-01-23 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
-+
- 2008-10-04 Ulrich Drepper <drepper@redhat.com>
-
- * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
-@@ -619,6 +623,11 @@
- * sparc_init.c: Likewise.
- * x86_64_init.c: Likewise.
-
-+2005-11-22 Roland McGrath <roland@redhat.com>
-+
-+ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
-+ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
-+
- 2005-11-19 Roland McGrath <roland@redhat.com>
-
- * ppc64_reloc.def: REL30 -> ADDR30.
-@@ -641,6 +650,9 @@
- * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
- (CLEANFILES): Add libebl_$(m).so.
-
-+ * Makefile.am (WEXTRA): New variable, substituted by configure.
-+ (AM_CFLAGS): Use it in place of -Wextra.
-+
- * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
- * ppc64_reloc.def: Likewise.
-
---- elfutils/backends/Makefile.am
-+++ elfutils/backends/Makefile.am
-@@ -124,7 +124,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a
- $(LINK) -shared -o $(@:.map=.so) \
- -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
- -Wl,--version-script,$(@:.so=.map) \
-- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap)
-+ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap)
- $(textrel_check)
-
- libebl_i386.so: $(cpu_i386)
---- elfutils/ChangeLog
-+++ elfutils/ChangeLog
-@@ -118,6 +118,8 @@
+Rebase to 1.161
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ ChangeLog | 30 +++++++++++++++++++++++
+ backends/ChangeLog | 12 +++++++++
+ backends/Makefile.am | 2 +-
+ config/ChangeLog | 4 +++
+ config/eu.am | 14 ++++++++---
+ configure.ac | 60 +++++++++++++++++++++++++++++++++++++++++++--
+ lib/ChangeLog | 8 ++++++
+ lib/eu-config.h | 11 +++++++++
+ libasm/ChangeLog | 5 ++++
+ libcpu/ChangeLog | 8 ++++++
+ libcpu/i386_disasm.c | 1 +
+ libdw/ChangeLog | 13 ++++++++++
+ libdw/dwarf_begin_elf.c | 8 ++++++
+ libdw/libdw.h | 2 +-
+ libdwfl/ChangeLog | 20 +++++++++++++++
+ libdwfl/linux-core-attach.c | 29 ++++++++++++++++++++++
+ libdwfl/linux-pid-attach.c | 14 +++++++++++
+ libebl/ChangeLog | 5 ++++
+ libelf/ChangeLog | 10 ++++++++
+ libelf/common.h | 4 +--
+ libelf/gnuhash_xlate.h | 6 +++--
+ src/ChangeLog | 30 +++++++++++++++++++++++
+ src/Makefile.am | 5 ++++
+ src/addr2line.c | 4 +--
+ src/findtextrel.c | 6 ++++-
+ src/ld.h | 2 ++
+ src/readelf.c | 15 ++++++++----
+ src/strings.c | 11 +++++++++
+ src/strip.c | 20 +++++++++++++--
+ tests/ChangeLog | 14 +++++++++++
+ tests/Makefile.am | 1 +
+ tests/backtrace.c | 1 +
+ tests/line2addr.c | 2 +-
+ 33 files changed, 355 insertions(+), 22 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index f81b302..3f9eaf1 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -187,6 +187,8 @@
2012-01-24 Mark Wielaard <mjw@redhat.com>
@@ -55,7 +50,7 @@
* COPYING: Fix address. Updated version from gnulib.
2012-01-23 Mark Wielaard <mjw@redhat.com>
-@@ -136,6 +138,9 @@
+@@ -205,6 +207,9 @@
2011-10-08 Mike Frysinger <vapier@gentoo.org>
@@ -65,7 +60,7 @@
* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
2011-10-02 Ulrich Drepper <drepper@gmail.com>
-@@ -157,6 +162,10 @@
+@@ -226,6 +231,10 @@
* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
@@ -76,7 +71,7 @@
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
-@@ -165,6 +174,10 @@
+@@ -234,6 +243,10 @@
* configure.ac (zip_LIBS): Check for liblzma too.
@@ -87,7 +82,7 @@
2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros.
-@@ -176,6 +189,8 @@
+@@ -245,6 +258,8 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -96,7 +91,7 @@
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
-@@ -256,6 +271,10 @@
+@@ -325,6 +340,10 @@
* configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am.
@@ -107,7 +102,7 @@
2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
-@@ -303,6 +322,17 @@
+@@ -372,6 +391,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile.
@@ -125,9 +120,61 @@
2005-05-19 Roland McGrath <roland@redhat.com>
* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
---- elfutils/config/ChangeLog
-+++ elfutils/config/ChangeLog
-@@ -44,6 +44,10 @@
+diff --git a/backends/ChangeLog b/backends/ChangeLog
+index e800d16..6a86248 100644
+--- a/backends/ChangeLog
++++ b/backends/ChangeLog
+@@ -433,6 +433,10 @@
+ * ppc_attrs.c (ppc_check_object_attribute): Handle tag
+ GNU_Power_ABI_Struct_Return.
+
++2009-01-23 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
++
+ 2008-10-04 Ulrich Drepper <drepper@redhat.com>
+
+ * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
+@@ -760,6 +764,11 @@
+ * sparc_init.c: Likewise.
+ * x86_64_init.c: Likewise.
+
++2005-11-22 Roland McGrath <roland@redhat.com>
++
++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
++ (libebl_%.so rule): Use it in place of -Wl,--as-needed.
++
+ 2005-11-19 Roland McGrath <roland@redhat.com>
+
+ * ppc64_reloc.def: REL30 -> ADDR30.
+@@ -782,6 +791,9 @@
+ * Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
+ (CLEANFILES): Add libebl_$(m).so.
+
++ * Makefile.am (WEXTRA): New variable, substituted by configure.
++ (AM_CFLAGS): Use it in place of -Wextra.
++
+ * ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
+ * ppc64_reloc.def: Likewise.
+
+diff --git a/backends/Makefile.am b/backends/Makefile.am
+index 4d15a5d..507c9df 100644
+--- a/backends/Makefile.am
++++ b/backends/Makefile.am
+@@ -131,7 +131,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ $(LINK) -shared -o $(@:.map=.so) \
+ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
+ -Wl,--version-script,$(@:.so=.map) \
+- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
+ @$(textrel_check)
+
+ libebl_i386.so: $(cpu_i386)
+diff --git a/config/ChangeLog b/config/ChangeLog
+index 1b4e896..058dd88 100644
+--- a/config/ChangeLog
++++ b/config/ChangeLog
+@@ -71,6 +71,10 @@
* known-dwarf.awk: Use gawk.
@@ -138,17 +185,19 @@
2010-07-02 Ulrich Drepper <drepper@redhat.com>
* elfutils.spec.in: Add more BuildRequires.
---- elfutils/config/eu.am
-+++ elfutils/config/eu.am
+diff --git a/config/eu.am b/config/eu.am
+index faf8add..6ca36a5 100644
+--- a/config/eu.am
++++ b/config/eu.am
@@ -1,6 +1,6 @@
## Common automake fragments for elfutils subdirectory makefiles.
##
--## Copyright (C) 2010 Red Hat, Inc.
-+## Copyright (C) 2010-2011 Red Hat, Inc.
+-## Copyright (C) 2010, 2014 Red Hat, Inc.
++## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
##
## This file is part of elfutils.
##
-@@ -29,14 +29,20 @@
+@@ -29,13 +29,21 @@
## not, see <http://www.gnu.org/licenses/>.
##
@@ -157,43 +206,26 @@
+
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
- AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
-- $(if $($(*F)_no_Werror),,-Werror) \
+-AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
++AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
+ $(if $($(*F)_no_Werror),,-Werror) \
- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
+ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
- $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
++ $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
$($(*F)_CFLAGS)
+if BUILD_WERROR
+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
+endif
+
- if MUDFLAP
- AM_CFLAGS += -fmudflap
- libmudflap = -lmudflap
---- elfutils/config.h.in
-+++ elfutils/config.h.in
-@@ -6,6 +6,9 @@
- /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */
- #undef ENABLE_DWZ
+ COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
-+/* Have __builtin_popcount. */
-+#undef HAVE_BUILTIN_POPCOUNT
-+
- /* Define to 1 if you have the <inttypes.h> header file. */
- #undef HAVE_INTTYPES_H
-
-@@ -102,4 +105,7 @@
- /* Define for large files, on AIX-style hosts. */
- #undef _LARGE_FILES
-
-+/* Stubbed out if missing compiler support. */
-+#undef __thread
-+
- #include <eu-config.h>
---- elfutils/configure.ac
-+++ elfutils/configure.ac
-@@ -99,6 +99,54 @@ CFLAGS="$old_CFLAGS"])
+ %.os: %.c %.o
+diff --git a/configure.ac b/configure.ac
+index 0e67a79..a1ad6db 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -89,6 +89,54 @@ CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
@@ -248,7 +280,7 @@
AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
# Use the same flags that we use for our DSOs, so the test is representative.
# Some old compiler/linker/libc combinations fail some ways and not others.
-@@ -114,7 +162,10 @@ static __thread int a; int foo (int b) {
+@@ -104,7 +152,10 @@ static __thread int a; int foo (int b) { return a + b; }]],
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"])
AS_IF([test "x$ac_cv_tls" != xyes],
@@ -260,9 +292,9 @@
dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
-@@ -213,6 +264,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_
+@@ -183,6 +234,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
AM_CONDITIONAL(BUILD_STATIC, [dnl
- test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
+ test "$use_gprof" = yes -o "$use_gcov" = yes])
+AC_ARG_ENABLE([werror],
+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
@@ -272,7 +304,7 @@
AC_ARG_ENABLE([tests-rpath],
AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
[tests_use_rpath=$enableval], [tests_use_rpath=no])
-@@ -324,7 +380,7 @@ case "$eu_version" in
+@@ -302,7 +358,7 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
@@ -281,9 +313,11 @@
AC_CHECK_SIZEOF(long)
---- elfutils/lib/ChangeLog
-+++ elfutils/lib/ChangeLog
-@@ -61,6 +61,9 @@
+diff --git a/lib/ChangeLog b/lib/ChangeLog
+index 4415213..4911cc1 100644
+--- a/lib/ChangeLog
++++ b/lib/ChangeLog
+@@ -65,6 +65,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -293,7 +327,7 @@
* eu-config.h: Add multiple inclusion protection.
2009-01-17 Ulrich Drepper <drepper@redhat.com>
-@@ -117,6 +120,11 @@
+@@ -121,6 +124,11 @@
* Makefile.am (libeu_a_SOURCES): Add it.
* system.h: Declare crc32_file.
@@ -305,9 +339,11 @@
2005-04-30 Ulrich Drepper <drepper@redhat.com>
* Makefile.am: Use -ffunction-sections for xmalloc.c.
---- elfutils/lib/eu-config.h
-+++ elfutils/lib/eu-config.h
-@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr
+diff --git a/lib/eu-config.h b/lib/eu-config.h
+index 3afff26..d89f3a8 100644
+--- a/lib/eu-config.h
++++ b/lib/eu-config.h
+@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .previous\n"
/* This macro is used by the tests conditionalize for standalone building. */
#define ELFUTILS_HEADER(name) <lib##name.h>
@@ -325,9 +361,11 @@
#ifdef SHARED
# define OLD_VERSION(name, version) \
---- elfutils/libasm/ChangeLog
-+++ elfutils/libasm/ChangeLog
-@@ -75,6 +75,11 @@
+diff --git a/libasm/ChangeLog b/libasm/ChangeLog
+index 9b25af9..32b9fd0 100644
+--- a/libasm/ChangeLog
++++ b/libasm/ChangeLog
+@@ -87,6 +87,11 @@
* asm_error.c: Add new error ASM_E_IOERROR.
* libasmP.h: Add ASM_E_IOERROR definition.
@@ -339,9 +377,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/ChangeLog
-+++ elfutils/libcpu/ChangeLog
-@@ -47,6 +47,9 @@
+diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
+index a20f440..5ea23b7 100644
+--- a/libcpu/ChangeLog
++++ b/libcpu/ChangeLog
+@@ -51,6 +51,9 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@@ -351,7 +391,7 @@
* Makefile.am (i386_parse_CFLAGS): Use quotes around command
substitution that can produce leading whitespace.
-@@ -376,6 +379,11 @@
+@@ -380,6 +383,11 @@
* defs/i386.doc: New file.
* defs/x86_64: New file.
@@ -363,9 +403,11 @@
2005-02-15 Ulrich Drepper <drepper@redhat.com>
* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
---- elfutils/libcpu/i386_disasm.c
-+++ elfutils/libcpu/i386_disasm.c
-@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con
+diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
+index 832241f..c7a0df0 100644
+--- a/libcpu/i386_disasm.c
++++ b/libcpu/i386_disasm.c
+@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
default:
assert (! "INVALID not handled");
@@ -373,9 +415,11 @@
}
}
else
---- elfutils/libdw/ChangeLog
-+++ elfutils/libdw/ChangeLog
-@@ -346,6 +346,10 @@
+diff --git a/libdw/ChangeLog b/libdw/ChangeLog
+index abc2d71..a9ee0b0 100644
+--- a/libdw/ChangeLog
++++ b/libdw/ChangeLog
+@@ -717,6 +717,10 @@
* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
@@ -386,7 +430,7 @@
2011-07-14 Mark Wielaard <mjw@redhat.com>
* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
-@@ -705,6 +709,10 @@
+@@ -1076,6 +1080,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
@@ -397,7 +441,7 @@
2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename.
-@@ -1473,6 +1481,11 @@
+@@ -1844,6 +1852,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
@@ -409,9 +453,11 @@
* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
formref offset.
---- elfutils/libdw/dwarf_begin_elf.c
-+++ elfutils/libdw/dwarf_begin_elf.c
-@@ -48,6 +48,14 @@
+diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
+index 4c49ce2..7ea1430 100644
+--- a/libdw/dwarf_begin_elf.c
++++ b/libdw/dwarf_begin_elf.c
+@@ -47,6 +47,14 @@
#if USE_ZLIB
# include <endian.h>
# define crc32 loser_crc32
@@ -426,9 +472,11 @@
# include <zlib.h>
# undef crc32
#endif
---- elfutils/libdw/libdw.h
-+++ elfutils/libdw/libdw.h
-@@ -879,7 +879,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
+diff --git a/libdw/libdw.h b/libdw/libdw.h
+index b2b2282..722c589 100644
+--- a/libdw/libdw.h
++++ b/libdw/libdw.h
+@@ -1003,7 +1003,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler);
/* Inline optimizations. */
@@ -437,9 +485,11 @@
/* Return attribute code of given attribute. */
__libdw_extern_inline unsigned int
dwarf_whatattr (Dwarf_Attribute *attr)
---- elfutils/libdwfl/ChangeLog
-+++ elfutils/libdwfl/ChangeLog
-@@ -283,6 +283,21 @@
+diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
+index 69e59a6..15c2987 100644
+--- a/libdwfl/ChangeLog
++++ b/libdwfl/ChangeLog
+@@ -571,6 +571,21 @@
(dwfl_module_addrsym) (i_to_symfile): New function.
(dwfl_module_addrsym) (search_table): Use it.
@@ -461,7 +511,7 @@
2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Mark Wielaard <mjw@redhat.com>
-@@ -2048,6 +2063,11 @@
+@@ -2336,6 +2351,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
@@ -473,8 +523,10 @@
* Makefile.am (noinst_HEADERS): Add loc2c.c.
* test2.c (main): Check sscanf result to quiet warning.
---- elfutils/libdwfl/linux-core-attach.c
-+++ elfutils/libdwfl/linux-core-attach.c
+diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
+index 5a7b3b3..d05ac7e 100644
+--- a/libdwfl/linux-core-attach.c
++++ b/libdwfl/linux-core-attach.c
@@ -29,6 +29,35 @@
#include "libdwflP.h"
#include <fcntl.h>
@@ -509,42 +561,45 @@
+# endif
+#endif
- #ifndef MIN
- # define MIN(a, b) ((a) < (b) ? (a) : (b))
---- elfutils/libdwfl/linux-pid-attach.c
-+++ elfutils/libdwfl/linux-pid-attach.c
-@@ -268,13 +268,24 @@ pid_thread_detach (Dwfl_Thread *thread,
- pid_arg->tid_attached = 0;
- if (! pid_arg->assume_ptrace_stopped)
- {
-+ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
-+ // handling of the detachment to keep the process State: T (stopped).
-+ if (pid_arg->tid_was_stopped)
-+ syscall (__NR_tkill, tid, SIGSTOP);
- /* This handling is needed only on older Linux kernels such as
-- 2.6.32-358.23.2.el6.ppc64. Later kernels such as
-- 3.11.7-200.fc19.x86_64 remember the T (stopped) state
-- themselves and no longer need to pass SIGSTOP during
-- PTRACE_DETACH. */
-+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64
-+ remember the T (stopped) state themselves and no longer need to pass
-+ SIGSTOP during PTRACE_DETACH. */
- ptrace (PTRACE_DETACH, tid, NULL,
- (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0));
-+ if (pid_arg->tid_was_stopped)
-+ {
-+ // Wait till the SIGSTOP settles down.
-+ int i;
-+ for (i = 0; i < 100000; i++)
-+ if (linux_proc_pid_is_stopped (tid))
-+ break;
-+ }
- }
+ #include "../libdw/memory-access.h"
+
+diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
+index efbcf03..ae5af38 100644
+--- a/libdwfl/linux-pid-attach.c
++++ b/libdwfl/linux-pid-attach.c
+@@ -255,6 +255,11 @@ void
+ internal_function
+ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ {
++ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
++ // handling of the detachment to keep the process State: T (stopped).
++ if (tid_was_stopped)
++ syscall (__NR_tkill, tid, SIGSTOP);
++
+ /* This handling is needed only on older Linux kernels such as
+ 2.6.32-358.23.2.el6.ppc64. Later kernels such as
+ 3.11.7-200.fc19.x86_64 remember the T (stopped) state
+@@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
+ PTRACE_DETACH. */
+ ptrace (PTRACE_DETACH, tid, NULL,
+ (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
++
++ if (tid_was_stopped)
++ {
++ // Wait till the SIGSTOP settles down.
++ int i;
++ for (i = 0; i < 100000; i++)
++ if (linux_proc_pid_is_stopped (tid))
++ break;
++ }
}
---- elfutils/libebl/ChangeLog
-+++ elfutils/libebl/ChangeLog
-@@ -738,6 +738,11 @@
+ static void
+diff --git a/libebl/ChangeLog b/libebl/ChangeLog
+index 5e635f2..998544f 100644
+--- a/libebl/ChangeLog
++++ b/libebl/ChangeLog
+@@ -765,6 +765,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
@@ -556,9 +611,11 @@
2005-05-21 Ulrich Drepper <drepper@redhat.com>
* libebl_x86_64.map: Add x86_64_core_note.
---- elfutils/libelf/ChangeLog
-+++ elfutils/libelf/ChangeLog
-@@ -85,6 +85,11 @@
+diff --git a/libelf/ChangeLog b/libelf/ChangeLog
+index 3b88d03..cb6cad5 100644
+--- a/libelf/ChangeLog
++++ b/libelf/ChangeLog
+@@ -244,6 +244,11 @@
* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
@@ -570,7 +627,7 @@
2011-02-26 Mark Wielaard <mjw@redhat.com>
* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
-@@ -762,6 +767,11 @@
+@@ -921,6 +926,11 @@
* elf.h: Update from glibc.
@@ -582,8 +639,10 @@
2005-05-08 Roland McGrath <roland@redhat.com>
* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
---- elfutils/libelf/common.h
-+++ elfutils/libelf/common.h
+diff --git a/libelf/common.h b/libelf/common.h
+index 744f1bb..185ea59 100644
+--- a/libelf/common.h
++++ b/libelf/common.h
@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
(Var) = (sizeof (Var) == 1 \
? (unsigned char) (Var) \
@@ -602,8 +661,10 @@
: (sizeof (Var) == 4 \
? bswap_32 (Var) \
: bswap_64 (Var))))
---- elfutils/libelf/gnuhash_xlate.h
-+++ elfutils/libelf/gnuhash_xlate.h
+diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
+index 04d9ca1..3e25936 100644
+--- a/libelf/gnuhash_xlate.h
++++ b/libelf/gnuhash_xlate.h
@@ -1,5 +1,5 @@
/* Conversion functions for versioning information.
- Copyright (C) 2006, 2007 Red Hat, Inc.
@@ -611,7 +672,7 @@
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2006.
-@@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void
+@@ -69,7 +69,9 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
dest32 = (Elf32_Word *) &dest64[bitmask_words];
while (len >= 4)
{
@@ -622,24 +683,11 @@
len -= 4;
}
}
---- elfutils/src/addr2line.c
-+++ elfutils/src/addr2line.c
-@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl
- bool parsed = false;
- int i, j;
- char *name = NULL;
-- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- && string[i] == '\0')
- parsed = adjust_to_section (name, &addr, dwfl);
-- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- {
- default:
- break;
---- elfutils/src/ChangeLog
-+++ elfutils/src/ChangeLog
-@@ -964,8 +964,16 @@
+diff --git a/src/ChangeLog b/src/ChangeLog
+index 0ae863e..1162f6e 100644
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1371,8 +1371,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use
print_ops.
@@ -656,7 +704,7 @@
* ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com>
-@@ -1129,6 +1137,8 @@
+@@ -1536,6 +1544,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET.
@@ -665,7 +713,7 @@
2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
-@@ -1312,6 +1322,11 @@
+@@ -1719,6 +1729,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO.
@@ -677,7 +725,7 @@
2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast.
-@@ -1563,6 +1578,8 @@
+@@ -1970,6 +1985,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
@@ -686,7 +734,7 @@
2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file.
-@@ -2002,6 +2019,10 @@
+@@ -2409,6 +2426,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
@@ -697,7 +745,7 @@
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -2078,6 +2099,10 @@
+@@ -2485,6 +2506,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
@@ -708,7 +756,7 @@
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -2426,6 +2451,11 @@
+@@ -2833,6 +2858,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
@@ -720,9 +768,44 @@
2005-05-30 Roland McGrath <roland@redhat.com>
* readelf.c (print_debug_line_section): Print section offset of each
---- elfutils/src/findtextrel.c
-+++ elfutils/src/findtextrel.c
-@@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void *
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 4f198da..a612cf6 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -89,6 +89,11 @@ endif
+ # XXX While the file is not finished, don't warn about this
+ ldgeneric_no_Wunused = yes
+
++# Buggy old compilers or libc headers.
++readelf_no_Werror = yes
++strings_no_Werror = yes
++addr2line_no_Wformat = yes
++
+ readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
+ nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
+ $(demanglelib)
+diff --git a/src/addr2line.c b/src/addr2line.c
+index de80294..e982982 100644
+--- a/src/addr2line.c
++++ b/src/addr2line.c
+@@ -540,10 +540,10 @@ handle_address (const char *string, Dwfl *dwfl)
+ bool parsed = false;
+ int i, j;
+ char *name = NULL;
+- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ && string[i] == '\0')
+ parsed = adjust_to_section (name, &addr, dwfl);
+- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ {
+ default:
+ break;
+diff --git a/src/findtextrel.c b/src/findtextrel.c
+index 264a06b..d7de202 100644
+--- a/src/findtextrel.c
++++ b/src/findtextrel.c
+@@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void *p2)
static void
@@ -735,8 +818,10 @@
GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
const char *fname, bool more_than_one, void **knownsrcs)
{
---- elfutils/src/ld.h
-+++ elfutils/src/ld.h
+diff --git a/src/ld.h b/src/ld.h
+index 29f4031..8695c31 100644
+--- a/src/ld.h
++++ b/src/ld.h
@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
/* Checked whether the symbol is undefined and referenced from a DSO. */
@@ -745,28 +830,18 @@
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
-@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin
+@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scninfo, size_t symidx)
return sym->defined && sym->in_dso;
}
+#endif /* Optimizing and not GCC 4.2. */
#endif /* ld.h */
---- elfutils/src/Makefile.am
-+++ elfutils/src/Makefile.am
-@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes
- # XXX While the file is not finished, don't warn about this
- ldgeneric_no_Wunused = yes
-
-+# Buggy old compilers.
-+readelf_no_Werror = yes
-+
- readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl
- nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \
- $(demanglelib)
---- elfutils/src/readelf.c
-+++ elfutils/src/readelf.c
-@@ -4171,10 +4171,12 @@ listptr_base (struct listptr *p)
+diff --git a/src/readelf.c b/src/readelf.c
+index d49544f..15dbe62 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -4368,10 +4368,12 @@ listptr_base (struct listptr *p)
return base;
}
@@ -781,7 +856,7 @@
struct listptr *p1 = (void *) a;
struct listptr *p2 = (void *) b;
-@@ -4263,8 +4265,11 @@ static void
+@@ -4467,8 +4469,11 @@ static void
sort_listptr (struct listptr_table *table, const char *name)
{
if (table->n > 0)
@@ -795,7 +870,7 @@
}
static bool
-@@ -9151,7 +9156,7 @@ dump_archive_index (Elf *elf, const char
+@@ -9540,7 +9545,7 @@ dump_archive_index (Elf *elf, const char *fname)
if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL))
@@ -804,8 +879,10 @@
while (1)
#endif
error (EXIT_FAILURE, 0,
---- elfutils/src/strings.c
-+++ elfutils/src/strings.c
+diff --git a/src/strings.c b/src/strings.c
+index f60e4b4..dae6ab2 100644
+--- a/src/strings.c
++++ b/src/strings.c
@@ -43,6 +43,10 @@
#include <system.h>
@@ -817,7 +894,7 @@
/* Prototypes of local functions. */
static int read_fd (int fd, const char *fname, off64_t fdlen);
-@@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off
+@@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
fd, start_off);
if (mem != MAP_FAILED)
{
@@ -831,7 +908,7 @@
break;
}
if (errno != EINVAL && errno != ENOMEM)
-@@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o
+@@ -581,9 +590,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
elfmap_off = from & ~(ps - 1);
elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
@@ -843,8 +920,10 @@
}
if (unlikely (elfmap == MAP_FAILED))
---- elfutils/src/strip.c
-+++ elfutils/src/strip.c
+diff --git a/src/strip.c b/src/strip.c
+index 2b21799..1b34eee 100644
+--- a/src/strip.c
++++ b/src/strip.c
@@ -45,6 +45,12 @@
#include <libebl.h>
#include <system.h>
@@ -877,7 +956,7 @@
}
/* Open the file. */
-@@ -2060,7 +2076,7 @@ while computing checksum for debug infor
+@@ -2091,7 +2107,7 @@ while computing checksum for debug information"));
/* If requested, preserve the timestamp. */
if (tvp != NULL)
{
@@ -886,7 +965,7 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"),
-@@ -2117,7 +2133,7 @@ handle_ar (int fd, Elf *elf, const char
+@@ -2148,7 +2164,7 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname,
if (tvp != NULL)
{
@@ -895,19 +974,11 @@
{
error (0, errno, gettext ("\
cannot set access and modification date of '%s'"), fname);
---- elfutils/tests/backtrace.c
-+++ elfutils/tests/backtrace.c
-@@ -36,6 +36,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <argp.h>
-+#include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
-
- static int
---- elfutils/tests/ChangeLog
-+++ elfutils/tests/ChangeLog
-@@ -123,6 +123,13 @@
+diff --git a/tests/ChangeLog b/tests/ChangeLog
+index 59048f6..02eccfc 100644
+--- a/tests/ChangeLog
++++ b/tests/ChangeLog
+@@ -421,6 +421,13 @@
2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
@@ -921,7 +992,7 @@
* Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
backtrace-data and backtrace-dwarf.
(BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
-@@ -987,6 +994,8 @@
+@@ -1285,6 +1292,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
@@ -930,7 +1001,7 @@
* testfile45.S.bz2: Add tests for cltq, cqto.
* testfile45.expect.bz2: Adjust.
-@@ -1695,6 +1704,11 @@
+@@ -1993,6 +2002,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
@@ -942,8 +1013,34 @@
2005-05-24 Ulrich Drepper <drepper@redhat.com>
* get-files.c (main): Use correct format specifier.
---- elfutils/tests/line2addr.c
-+++ elfutils/tests/line2addr.c
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index f32e4d0..2652fb8 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -365,6 +365,7 @@ get_lines_LDADD = $(libdw) $(libelf)
+ get_files_LDADD = $(libdw) $(libelf)
+ get_aranges_LDADD = $(libdw) $(libelf)
+ allfcts_LDADD = $(libdw) $(libelf)
++line2addr_no_Wformat = yes
+ line2addr_LDADD = $(libdw)
+ addrscopes_LDADD = $(libdw)
+ funcscopes_LDADD = $(libdw)
+diff --git a/tests/backtrace.c b/tests/backtrace.c
+index 331ba0f..46af9b5 100644
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <argp.h>
++#include <sys/syscall.h>
+ #include ELFUTILS_HEADER(dwfl)
+
+ #ifndef __linux__
+diff --git a/tests/line2addr.c b/tests/line2addr.c
+index e0d65d3..7c171b9 100644
+--- a/tests/line2addr.c
++++ b/tests/line2addr.c
@@ -124,7 +124,7 @@ main (int argc, char *argv[])
{
struct args a = { .arg = argv[cnt] };
@@ -953,3 +1050,6 @@
{
default:
case 0:
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
index c08519cf53..c08519cf53 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/scanf-format.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
index eae5796de3..eae5796de3 100644
--- a/meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/testsuite-ignore-elflint.diff
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch
new file mode 100644
index 0000000000..f1533bfd38
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch
@@ -0,0 +1,106 @@
+From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
+From: Junling Zheng <zhengjunling@huawei.com>
+Date: Thu, 9 Apr 2015 12:12:49 +0000
+Subject: [PATCH] uclibc support for elfutils 0.161
+
+on uclibc systems libintl and libuargp are separate from libc.
+so they need to be specified on commandline when we use proxy-libintl
+then libintl is a static archive so it should be listed last since
+elfutils does not respect disable-nls we need to link in libintl
+
+We add a new option --enable-uclibc which will be used to control
+the uclibc specific configurations during build.
+
+Upstream-Status: Inappropriate [uclibc specific]
+
+Signed-off-by: Khem Raj <raj.khem>
+Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
+[Junling Zheng:
+ - adjust context
+]
+---
+ configure.ac | 8 ++++++++
+ libcpu/Makefile.am | 4 ++++
+ libdw/Makefile.am | 7 ++++++-
+ libelf/Makefile.am | 5 +++++
+ 4 files changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a1ad6db..81fc33f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,6 +70,14 @@ AS_IF([test "$use_locks" = yes],
+
+ AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+
++AC_ARG_ENABLE([uclibc],
++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
++
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
+index 3beccf3..9ba6c04 100644
+--- a/libcpu/Makefile.am
++++ b/libcpu/Makefile.am
+@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
+ i386_lex.o: i386_parse.h
+ i386_gendis_LDADD = $(libeu) -lm
+
++if USE_UCLIBC
++i386_gendis_LDADD += -luargp -lintl
++endif
++
+ i386_parse.h: i386_parse.c ;
+
+ EXTRA_DIST = defs/i386
+diff --git a/libdw/Makefile.am b/libdw/Makefile.am
+index 887da6b..d31b428 100644
+--- a/libdw/Makefile.am
++++ b/libdw/Makefile.am
+@@ -102,6 +102,11 @@ endif
+ libdw_pic_a_SOURCES =
+ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+
++libdw_so_LDLIBS =
++if USE_UCLIBC
++libdw_so_LDLIBS += -lintl -luargp
++endif
++
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
+@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+- -ldl $(zip_LIBS)
++ -ldl $(zip_LIBS) $(libdw_so_LDLIBS)
+ @$(textrel_check)
+ ln -fs $@ $@.$(VERSION)
+
+diff --git a/libelf/Makefile.am b/libelf/Makefile.am
+index afcb2aa..02836a1 100644
+--- a/libelf/Makefile.am
++++ b/libelf/Makefile.am
+@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
+ libelf_pic_a_SOURCES =
+ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
+
++
+ libelf_so_LDLIBS =
++if USE_UCLIBC
++libelf_so_LDLIBS += -lintl -luargp
++endif
++
+ if USE_LOCKS
+ libelf_so_LDLIBS += -lpthread
+ endif
+--
+1.8.3.4
+
diff --git a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
index 5a98f6b9d0..374cba555e 100644
--- a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
+++ b/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch
@@ -15,15 +15,15 @@ index 6faf113..04d9ca1 100644
Elf32_Word *dest32 = dest;
const Elf32_Word *src32 = src;
+ Elf32_Word save_src32_2 = src32[2]; // dest could be equal to src
-
+
/* First four control words, 32 bits. */
for (unsigned int cnt = 0; cnt < 4; ++cnt)
@@ -50,7 +51,7 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
len -= 4;
}
-
+
- Elf32_Word bitmask_words = encode ? src32[2] : dest32[2];
+ Elf32_Word bitmask_words = encode ? save_src32_2 : dest32[2];
-
+
/* Now the 64 bit words. */
Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4];
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index 5e75f129a4..c3f90ec51a 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -8,7 +8,7 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
PR = "r11"
-SRC_URI = "https://fedorahosted.org/releases/e/l/${PN}/${BP}.tar.bz2"
+SRC_URI = "https://fedorahosted.org/releases/e/l/${BPN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "a0bed1130135f17ad27533b0034dba8d"
SRC_URI[sha256sum] = "8aebfa4a745db21cf5429c9541fe482729b62efc7e53e9110151b4169fe887da"
@@ -36,7 +36,7 @@ SRC_URI += "\
file://elf_begin.c-CVE-2014-9447-fix.patch \
"
# Only apply when building uclibc based target recipe
-SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
+SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.patch"
# The buildsystem wants to generate 2 .h files from source using a binary it just built,
# which can not pass the cross compiling, so let's work around it by adding 2 .h files
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.158.bb b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
index 42724a1590..c4c7cbca86 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.158.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
@@ -7,14 +7,21 @@ DEPENDS = "libtool bzip2 zlib virtual/libintl"
SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/elfutils-${PV}.tar.bz2"
-SRC_URI[md5sum] = "050a4909e452d01ab4747fd69d4036e0"
-SRC_URI[sha256sum] = "be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d"
+SRC_URI[md5sum] = "e1b9847c9a6a1ad340de8d47a863ec52"
+SRC_URI[sha256sum] = "570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070"
-# Pick patches from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.158-2.debian.tar.xz
+SRC_URI += "\
+ file://mempcpy.patch \
+ file://dso-link-change.patch \
+ file://Fix_elf_cvt_gunhash.patch \
+ file://fixheadercheck.patch \
+ file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
+"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz
SRC_URI += "\
file://redhat-portability.diff \
- file://redhat-robustify.diff \
file://hppa_backend.diff \
file://arm_backend.diff \
file://mips_backend.diff \
@@ -22,19 +29,13 @@ SRC_URI += "\
file://testsuite-ignore-elflint.diff \
file://scanf-format.patch \
file://mips_readelf_w.patch \
- file://core_filename.patch \
- file://CVE-2014-0172.patch \
- file://unwind_non_linux.patch \
- file://elf_additions.diff \
- file://mempcpy.patch \
- file://dso-link-change.patch \
- file://m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch \
- file://fixheadercheck.patch \
- file://Fix_elf_cvt_gunhash.patch \
+ file://arm_func_value.patch \
+ file://arm_unwind_ret_mask.patch \
+ file://non_linux.patch \
"
# Only apply when building uclibc based target recipe
-SRC_URI_append_libc-uclibc = " file://uclibc-support.patch"
+SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch"
# The buildsystem wants to generate 2 .h files from source using a binary it just built,
# which can not pass the cross compiling, so let's work around it by adding 2 .h files
diff --git a/meta/recipes-devtools/expect/expect_5.45.bb b/meta/recipes-devtools/expect/expect_5.45.bb
index 3e839a2fe3..264f00718b 100644
--- a/meta/recipes-devtools/expect/expect_5.45.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.bb
@@ -16,7 +16,9 @@ LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
DEPENDS += "tcl"
RDEPENDS_${PN} = "tcl"
-inherit autotools-brokensep
+inherit autotools
+
+PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
file://0001-configure.in.patch \
diff --git a/meta/recipes-devtools/fdisk/gptfdisk_git.bb b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
new file mode 100644
index 0000000000..477c1d986f
--- /dev/null
+++ b/meta/recipes-devtools/fdisk/gptfdisk_git.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "util-linux popt ncurses"
+
+PV = "0.8.10+git${SRCPV}"
+SRCREV = "a920398fa393f9d6301b32b191bc01e086ab8bc8"
+SRC_URI = "git://git.code.sf.net/p/gptfdisk/code"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 cgdisk ${D}${sbindir}
+ install -m 0755 gdisk ${D}${sbindir}
+ install -m 0755 sgdisk ${D}${sbindir}
+ install -m 0755 fixparts ${D}${sbindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/file/file/debian-742262.patch b/meta/recipes-devtools/file/file/debian-742262.patch
index d57258c56b..1ef485e93c 100644
--- a/meta/recipes-devtools/file/file/debian-742262.patch
+++ b/meta/recipes-devtools/file/file/debian-742262.patch
@@ -9,10 +9,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
-@@ -50,6 +50,7 @@
+@@ -57,6 +57,7 @@
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
- 0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+ 0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk or perl script text
+!:strength - 12
# AT&T Bell Labs' Plan 9 shell
diff --git a/meta/recipes-devtools/file/file/file-CVE-2014-9620-and-CVE-2014-9621.patch b/meta/recipes-devtools/file/file/file-CVE-2014-9620-and-CVE-2014-9621.patch
deleted file mode 100644
index 2482de3998..0000000000
--- a/meta/recipes-devtools/file/file/file-CVE-2014-9620-and-CVE-2014-9621.patch
+++ /dev/null
@@ -1,1414 +0,0 @@
-file: CVE-2014-9620 and CVE-2014-9621
-
-CVE-2014-9620:
-Limit the number of ELF notes processed - DoS
-CVE-2014-9621:
-Limit string printing to 100 chars - DoS
-
-The patch comes from:
-https://github.com/file/file/commit/6ce24f35cd4a43c4bdd249e8e0c4952c1f8eac67
-https://github.com/file/file/commit/0056ec32255de1de973574b0300161a1568767d6
-https://github.com/file/file/commit/09e41625c999a2e5b51e1092f0ef2432a99b5c33
-https://github.com/file/file/commit/af444af0738468393f40f9d2261b1ea10fc4b2ba
-https://github.com/file/file/commit/68bd8433c7e11a8dbe100deefdfac69138ee7cd9
-https://github.com/file/file/commit/dddd3cdb95210a765dd90f7d722cb8b5534daee7
-https://github.com/file/file/commit/445c8fb0ebff85195be94cd9f7e1df89cade5c7f
-https://github.com/file/file/commit/ce90e05774dd77d86cfc8dfa6da57b32816841c4
-https://github.com/file/file/commit/65437cee25199dbd385fb35901bc0011e164276c
-
-Upstream-Status: Backport
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- src/apprentice.c | 5 +
- src/ascmagic.c | 3 +-
- src/elfclass.h | 34 ++--
- src/file.c | 59 ++++++-
- src/file.h | 20 ++-
- src/file_opts.h | 6 +
- src/funcs.c | 42 ++++-
- src/magic.c | 50 ++++++
- src/magic.h | 9 ++
- src/magic.h.in | 9 ++
- src/readelf.c | 471 +++++++++++++++++++++++++++++++++----------------------
- src/softmagic.c | 93 ++++++-----
- 12 files changed, 566 insertions(+), 235 deletions(-)
-
-diff --git a/src/apprentice.c b/src/apprentice.c
-index 7400c57..231dc7e 100644
---- a/src/apprentice.c
-+++ b/src/apprentice.c
-@@ -506,6 +506,11 @@ file_ms_alloc(int flags)
- ms->mlist[i] = NULL;
- ms->file = "unknown";
- ms->line = 0;
-+ ms->indir_max = FILE_INDIR_MAX;
-+ ms->name_max = FILE_NAME_MAX;
-+ ms->elf_shnum_max = FILE_ELF_SHNUM_MAX;
-+ ms->elf_phnum_max = FILE_ELF_PHNUM_MAX;
-+ ms->elf_notes_max = FILE_ELF_NOTES_MAX;
- return ms;
- free:
- free(ms);
-diff --git a/src/ascmagic.c b/src/ascmagic.c
-index ca26665..0a4cd10 100644
---- a/src/ascmagic.c
-+++ b/src/ascmagic.c
-@@ -147,7 +147,8 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
- == NULL)
- goto done;
- if ((rv = file_softmagic(ms, utf8_buf,
-- (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
-+ (size_t)(utf8_end - utf8_buf), 0, NULL,
-+ TEXTTEST, text)) == 0)
- rv = -1;
- }
-
-diff --git a/src/elfclass.h b/src/elfclass.h
-index 010958a..5360b0b 100644
---- a/src/elfclass.h
-+++ b/src/elfclass.h
-@@ -32,39 +32,51 @@
- swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[EI_DATA];
-
- type = elf_getu16(swap, elfhdr.e_type);
-+ notecount = ms->elf_notes_max;
- switch (type) {
- #ifdef ELFCORE
- case ET_CORE:
-+ phnum = elf_getu16(swap, elfhdr.e_phnum);
-+ if (phnum > ms->elf_phnum_max)
-+ return toomany(ms, "program headers", phnum);
- flags |= FLAGS_IS_CORE;
- if (dophn_core(ms, clazz, swap, fd,
-- (off_t)elf_getu(swap, elfhdr.e_phoff),
-- elf_getu16(swap, elfhdr.e_phnum),
-+ (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
- (size_t)elf_getu16(swap, elfhdr.e_phentsize),
-- fsize, &flags) == -1)
-+ fsize, &flags, &notecount) == -1)
- return -1;
- break;
- #endif
- case ET_EXEC:
- case ET_DYN:
-+ phnum = elf_getu16(swap, elfhdr.e_phnum);
-+ if (phnum > ms->elf_phnum_max)
-+ return toomany(ms, "program", phnum);
-+ shnum = elf_getu16(swap, elfhdr.e_shnum);
-+ if (shnum > ms->elf_shnum_max)
-+ return toomany(ms, "section", shnum);
- if (dophn_exec(ms, clazz, swap, fd,
-- (off_t)elf_getu(swap, elfhdr.e_phoff),
-- elf_getu16(swap, elfhdr.e_phnum),
-+ (off_t)elf_getu(swap, elfhdr.e_phoff), phnum,
- (size_t)elf_getu16(swap, elfhdr.e_phentsize),
-- fsize, &flags, elf_getu16(swap, elfhdr.e_shnum))
-- == -1)
-+ fsize, shnum, &flags, &notecount) == -1)
- return -1;
- /*FALLTHROUGH*/
- case ET_REL:
-+ shnum = elf_getu16(swap, elfhdr.e_shnum);
-+ if (shnum > ms->elf_shnum_max)
-+ return toomany(ms, "section headers", shnum);
- if (doshn(ms, clazz, swap, fd,
-- (off_t)elf_getu(swap, elfhdr.e_shoff),
-- elf_getu16(swap, elfhdr.e_shnum),
-+ (off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
- (size_t)elf_getu16(swap, elfhdr.e_shentsize),
-- fsize, &flags, elf_getu16(swap, elfhdr.e_machine),
-- (int)elf_getu16(swap, elfhdr.e_shstrndx)) == -1)
-+ fsize, elf_getu16(swap, elfhdr.e_machine),
-+ (int)elf_getu16(swap, elfhdr.e_shstrndx),
-+ &flags, &notecount) == -1)
- return -1;
- break;
-
- default:
- break;
- }
-+ if (notecount == 0)
-+ return toomany(ms, "notes", ms->elf_notes_max);
- return 1;
-diff --git a/src/file.c b/src/file.c
-index 370da91..b69b725 100644
---- a/src/file.c
-+++ b/src/file.c
-@@ -101,7 +101,7 @@ private const struct option long_options[] = {
- #undef OPT_LONGONLY
- {0, 0, NULL, 0}
- };
--#define OPTSTRING "bcCde:Ef:F:hiklLm:nNprsvz0"
-+#define OPTSTRING "bcCde:Ef:F:hiklLm:nNpP:rsvz0"
-
- private const struct {
- const char *name;
-@@ -119,6 +119,18 @@ private const struct {
- { "tokens", MAGIC_NO_CHECK_TOKENS }, /* OBSOLETE: ignored for backwards compatibility */
- };
-
-+private struct {
-+ const char *name;
-+ int tag;
-+ size_t value;
-+} pm[] = {
-+ { "indir", MAGIC_PARAM_INDIR_MAX, 0 },
-+ { "name", MAGIC_PARAM_NAME_MAX, 0 },
-+ { "elf_phnum", MAGIC_PARAM_ELF_PHNUM_MAX, 0 },
-+ { "elf_shnum", MAGIC_PARAM_ELF_SHNUM_MAX, 0 },
-+ { "elf_notes", MAGIC_PARAM_ELF_NOTES_MAX, 0 },
-+};
-+
- private char *progname; /* used throughout */
-
- private void usage(void);
-@@ -128,6 +140,8 @@ private void help(void);
- private int unwrap(struct magic_set *, const char *);
- private int process(struct magic_set *ms, const char *, int);
- private struct magic_set *load(const char *, int);
-+private void setparam(const char *);
-+private void applyparam(magic_t);
-
-
- /*
-@@ -243,9 +257,13 @@ main(int argc, char *argv[])
- flags |= MAGIC_PRESERVE_ATIME;
- break;
- #endif
-+ case 'P':
-+ setparam(optarg);
-+ break;
- case 'r':
- flags |= MAGIC_RAW;
- break;
-+ break;
- case 's':
- flags |= MAGIC_DEVICES;
- break;
-@@ -298,6 +316,8 @@ main(int argc, char *argv[])
- strerror(errno));
- return 1;
- }
-+
-+
- switch(action) {
- case FILE_CHECK:
- c = magic_check(magic, magicfile);
-@@ -321,7 +341,7 @@ main(int argc, char *argv[])
- if (magic == NULL)
- if ((magic = load(magicfile, flags)) == NULL)
- return 1;
-- break;
-+ applyparam(magic);
- }
-
- if (optind == argc) {
-@@ -351,6 +371,41 @@ main(int argc, char *argv[])
- return e;
- }
-
-+private void
-+applyparam(magic_t magic)
-+{
-+ size_t i;
-+
-+ for (i = 0; i < __arraycount(pm); i++) {
-+ if (pm[i].value == 0)
-+ continue;
-+ if (magic_setparam(magic, pm[i].tag, &pm[i].value) == -1) {
-+ (void)fprintf(stderr, "%s: Can't set %s %s\n", progname,
-+ pm[i].name, strerror(errno));
-+ exit(1);
-+ }
-+ }
-+}
-+
-+private void
-+setparam(const char *p)
-+{
-+ size_t i;
-+ char *s;
-+
-+ if ((s = strchr(p, '=')) == NULL)
-+ goto badparm;
-+
-+ for (i = 0; i < __arraycount(pm); i++) {
-+ if (strncmp(p, pm[i].name, s - p) != 0)
-+ continue;
-+ pm[i].value = atoi(s + 1);
-+ return;
-+ }
-+badparm:
-+ (void)fprintf(stderr, "%s: Unknown param %s\n", progname, p);
-+ exit(1);
-+}
-
- private struct magic_set *
- /*ARGSUSED*/
-diff --git a/src/file.h b/src/file.h
-index 5c67ddd..88da1d1 100644
---- a/src/file.h
-+++ b/src/file.h
-@@ -400,6 +400,16 @@ struct magic_set {
- /* FIXME: Make the string dynamically allocated so that e.g.
- strings matched in files can be longer than MAXstring */
- union VALUETYPE ms_value; /* either number or string */
-+ uint16_t indir_max;
-+ uint16_t name_max;
-+ uint16_t elf_shnum_max;
-+ uint16_t elf_phnum_max;
-+ uint16_t elf_notes_max;
-+#define FILE_INDIR_MAX 15
-+#define FILE_NAME_MAX 30
-+#define FILE_ELF_SHNUM_MAX 32768
-+#define FILE_ELF_PHNUM_MAX 128
-+#define FILE_ELF_NOTES_MAX 256
- };
-
- /* Type for Unicode characters */
-@@ -439,7 +449,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t,
- unichar **, size_t *, const char **, const char **, const char **);
- protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
- protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
-- size_t, int, int);
-+ uint16_t, uint16_t *, int, int);
- protected int file_apprentice(struct magic_set *, const char *, int);
- protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
- protected uint64_t file_signextend(struct magic_set *, struct magic *,
-@@ -469,6 +479,14 @@ protected int file_os2_apptype(struct magic_set *, const char *, const void *,
- #endif /* __EMX__ */
-
-
-+typedef struct {
-+ char *buf;
-+ uint32_t offset;
-+} file_pushbuf_t;
-+
-+protected file_pushbuf_t *file_push_buffer(struct magic_set *);
-+protected char *file_pop_buffer(struct magic_set *, file_pushbuf_t *);
-+
- #ifndef COMPILE_ONLY
- extern const char *file_names[];
- extern const size_t file_nnames;
-diff --git a/src/file_opts.h b/src/file_opts.h
-index db34eb7..3286ac6 100644
---- a/src/file_opts.h
-+++ b/src/file_opts.h
-@@ -43,6 +43,12 @@ OPT('0', "print0", 0, " terminate filenames with ASCII NUL\n")
- #if defined(HAVE_UTIME) || defined(HAVE_UTIMES)
- OPT('p', "preserve-date", 0, " preserve access times on files\n")
- #endif
-+OPT('P', "parameter", 0, " set file engine parameter limits\n"
-+ " indir 15 recursion limit for indirection\n"
-+ " name 30 use limit for name/use magic\n"
-+ " elf_notes 256 max ELF notes processed\n"
-+ " elf_phnum 128 max ELF prog sections processed\n"
-+ " elf_shnum 32768 max ELF sections processed\n")
- OPT('r', "raw", 0, " don't translate unprintable chars to \\ooo\n")
- OPT('s', "special-files", 0, " treat special (block/char devices) files as\n"
- " ordinary ones\n")
-diff --git a/src/funcs.c b/src/funcs.c
-index a9624a2..c3cf2be 100644
---- a/src/funcs.c
-+++ b/src/funcs.c
-@@ -230,7 +230,7 @@ file_buffer(struct magic_set *ms, int fd, const char *inname __attribute__ ((unu
-
- /* try soft magic tests */
- if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
-- if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
-+ if ((m = file_softmagic(ms, ubuf, nb, 0, NULL, BINTEST,
- looks_text)) != 0) {
- if ((ms->flags & MAGIC_DEBUG) != 0)
- (void)fprintf(stderr, "softmagic %d\n", m);
-@@ -459,3 +459,43 @@ out:
- free(old_lc_ctype);
- return rv;
- }
-+
-+protected file_pushbuf_t *
-+file_push_buffer(struct magic_set *ms)
-+{
-+ file_pushbuf_t *pb;
-+
-+ if (ms->event_flags & EVENT_HAD_ERR)
-+ return NULL;
-+
-+ if ((pb = (CAST(file_pushbuf_t *, malloc(sizeof(*pb))))) == NULL)
-+ return NULL;
-+
-+ pb->buf = ms->o.buf;
-+ pb->offset = ms->offset;
-+
-+ ms->o.buf = NULL;
-+ ms->offset = 0;
-+
-+ return pb;
-+}
-+
-+protected char *
-+file_pop_buffer(struct magic_set *ms, file_pushbuf_t *pb)
-+{
-+ char *rbuf;
-+
-+ if (ms->event_flags & EVENT_HAD_ERR) {
-+ free(pb->buf);
-+ free(pb);
-+ return NULL;
-+ }
-+
-+ rbuf = ms->o.buf;
-+
-+ ms->o.buf = pb->buf;
-+ ms->offset = pb->offset;
-+
-+ free(pb);
-+ return rbuf;
-+}
-diff --git a/src/magic.c b/src/magic.c
-index 22174b8..a89647c 100644
---- a/src/magic.c
-+++ b/src/magic.c
-@@ -490,3 +490,53 @@ magic_version(void)
- {
- return MAGIC_VERSION;
- }
-+
-+public int
-+magic_setparam(struct magic_set *ms, int param, const void *val)
-+{
-+ switch (param) {
-+ case MAGIC_PARAM_INDIR_MAX:
-+ ms->indir_max = *(const size_t *)val;
-+ return 0;
-+ case MAGIC_PARAM_NAME_MAX:
-+ ms->name_max = *(const size_t *)val;
-+ return 0;
-+ case MAGIC_PARAM_ELF_PHNUM_MAX:
-+ ms->elf_phnum_max = *(const size_t *)val;
-+ return 0;
-+ case MAGIC_PARAM_ELF_SHNUM_MAX:
-+ ms->elf_shnum_max = *(const size_t *)val;
-+ return 0;
-+ case MAGIC_PARAM_ELF_NOTES_MAX:
-+ ms->elf_notes_max = *(const size_t *)val;
-+ return 0;
-+ default:
-+ errno = EINVAL;
-+ return -1;
-+ }
-+}
-+
-+public int
-+magic_getparam(struct magic_set *ms, int param, void *val)
-+{
-+ switch (param) {
-+ case MAGIC_PARAM_INDIR_MAX:
-+ *(size_t *)val = ms->indir_max;
-+ return 0;
-+ case MAGIC_PARAM_NAME_MAX:
-+ *(size_t *)val = ms->name_max;
-+ return 0;
-+ case MAGIC_PARAM_ELF_PHNUM_MAX:
-+ *(size_t *)val = ms->elf_phnum_max;
-+ return 0;
-+ case MAGIC_PARAM_ELF_SHNUM_MAX:
-+ *(size_t *)val = ms->elf_shnum_max;
-+ return 0;
-+ case MAGIC_PARAM_ELF_NOTES_MAX:
-+ *(size_t *)val = ms->elf_notes_max;
-+ return 0;
-+ default:
-+ errno = EINVAL;
-+ return -1;
-+ }
-+}
-diff --git a/src/magic.h b/src/magic.h
-index 535a177..89bfe4b 100644
---- a/src/magic.h
-+++ b/src/magic.h
-@@ -101,6 +101,15 @@ int magic_check(magic_t, const char *);
- int magic_list(magic_t, const char *);
- int magic_errno(magic_t);
-
-+#define MAGIC_PARAM_INDIR_MAX 0
-+#define MAGIC_PARAM_NAME_MAX 1
-+#define MAGIC_PARAM_ELF_PHNUM_MAX 2
-+#define MAGIC_PARAM_ELF_SHNUM_MAX 3
-+#define MAGIC_PARAM_ELF_NOTES_MAX 4
-+
-+int magic_setparam(magic_t, int, const void *);
-+int magic_getparam(magic_t, int, void *);
-+
- #ifdef __cplusplus
- };
- #endif
-diff --git a/src/magic.h.in b/src/magic.h.in
-index 86fc41b..2efc7bc 100644
---- a/src/magic.h.in
-+++ b/src/magic.h.in
-@@ -101,6 +101,15 @@ int magic_check(magic_t, const char *);
- int magic_list(magic_t, const char *);
- int magic_errno(magic_t);
-
-+#define MAGIC_PARAM_INDIR_MAX 0
-+#define MAGIC_PARAM_NAME_MAX 1
-+#define MAGIC_PARAM_ELF_PHNUM_MAX 2
-+#define MAGIC_PARAM_ELF_SHNUM_MAX 3
-+#define MAGIC_PARAM_ELF_NOTES_MAX 4
-+
-+int magic_setparam(magic_t, int, const void *);
-+int magic_getparam(magic_t, int, void *);
-+
- #ifdef __cplusplus
- };
- #endif
-diff --git a/src/readelf.c b/src/readelf.c
-index cbed129..87df727 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -43,14 +43,14 @@ FILE_RCSID("@(#)$File: readelf.c,v 1.102 2014/03/11 21:00:13 christos Exp $")
-
- #ifdef ELFCORE
- private int dophn_core(struct magic_set *, int, int, int, off_t, int, size_t,
-- off_t, int *);
-+ off_t, int *, uint16_t *);
- #endif
- private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t,
-- off_t, int *, int);
-+ off_t, int, int *, uint16_t *);
- private int doshn(struct magic_set *, int, int, int, off_t, int, size_t,
-- off_t, int *, int, int);
-+ off_t, int, int, int *, uint16_t *);
- private size_t donote(struct magic_set *, void *, size_t, size_t, int,
-- int, size_t, int *);
-+ int, size_t, int *, uint16_t *);
-
- #define ELF_ALIGN(a) ((((a) + align - 1) / align) * align)
-
-@@ -60,6 +60,19 @@ private uint16_t getu16(int, uint16_t);
- private uint32_t getu32(int, uint32_t);
- private uint64_t getu64(int, uint64_t);
-
-+#define MAX_PHNUM 128
-+#define MAX_SHNUM 32768
-+#define SIZE_UNKNOWN ((off_t)-1)
-+
-+private int
-+toomany(struct magic_set *ms, const char *name, uint16_t num)
-+{
-+ if (file_printf(ms, ", too many %s (%u)", name, num
-+ ) == -1)
-+ return -1;
-+ return 0;
-+}
-+
- private uint16_t
- getu16(int swap, uint16_t value)
- {
-@@ -280,15 +293,19 @@ private const char os_style_names[][8] = {
- "NetBSD",
- };
-
--#define FLAGS_DID_CORE 0x01
--#define FLAGS_DID_NOTE 0x02
--#define FLAGS_DID_BUILD_ID 0x04
--#define FLAGS_DID_CORE_STYLE 0x08
--#define FLAGS_IS_CORE 0x10
-+#define FLAGS_DID_CORE 0x001
-+#define FLAGS_DID_OS_NOTE 0x002
-+#define FLAGS_DID_BUILD_ID 0x004
-+#define FLAGS_DID_CORE_STYLE 0x008
-+#define FLAGS_DID_NETBSD_PAX 0x010
-+#define FLAGS_DID_NETBSD_MARCH 0x020
-+#define FLAGS_DID_NETBSD_CMODEL 0x040
-+#define FLAGS_DID_NETBSD_UNKNOWN 0x080
-+#define FLAGS_IS_CORE 0x100
-
- private int
- dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
-- int num, size_t size, off_t fsize, int *flags)
-+ int num, size_t size, off_t fsize, int *flags, uint16_t *notecount)
- {
- Elf32_Phdr ph32;
- Elf64_Phdr ph64;
-@@ -306,13 +323,13 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- * Loop through all the program headers.
- */
- for ( ; num; num--) {
-- if (pread(fd, xph_addr, xph_sizeof, off) == -1) {
-+ if (pread(fd, xph_addr, xph_sizeof, off) < (ssize_t)xph_sizeof) {
- file_badread(ms);
- return -1;
- }
- off += size;
-
-- if (xph_offset > fsize) {
-+ if (fsize != SIZE_UNKNOWN && xph_offset > fsize) {
- /* Perhaps warn here */
- continue;
- }
-@@ -334,7 +351,7 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- if (offset >= (size_t)bufsize)
- break;
- offset = donote(ms, nbuf, offset, (size_t)bufsize,
-- clazz, swap, 4, flags);
-+ clazz, swap, 4, flags, notecount);
- if (offset == 0)
- break;
-
-@@ -464,125 +481,128 @@ do_note_freebsd_version(struct magic_set *ms, int swap, void *v)
- }
- }
-
--private size_t
--donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
-- int clazz, int swap, size_t align, int *flags)
-+private int
-+do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
-+ int swap __attribute__((__unused__)), uint32_t namesz, uint32_t descsz,
-+ size_t noff, size_t doff, int *flags)
- {
-- Elf32_Nhdr nh32;
-- Elf64_Nhdr nh64;
-- size_t noff, doff;
--#ifdef ELFCORE
-- int os_style = -1;
--#endif
-- uint32_t namesz, descsz;
-- unsigned char *nbuf = CAST(unsigned char *, vbuf);
--
-- (void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
-- offset += xnh_sizeof;
--
-- namesz = xnh_namesz;
-- descsz = xnh_descsz;
-- if ((namesz == 0) && (descsz == 0)) {
-- /*
-- * We're out of note headers.
-- */
-- return (offset >= size) ? offset : size;
-- }
--
-- if (namesz & 0x80000000) {
-- (void)file_printf(ms, ", bad note name size 0x%lx",
-- (unsigned long)namesz);
-- return offset;
-- }
--
-- if (descsz & 0x80000000) {
-- (void)file_printf(ms, ", bad note description size 0x%lx",
-- (unsigned long)descsz);
-- return offset;
-- }
--
--
-- noff = offset;
-- doff = ELF_ALIGN(offset + namesz);
--
-- if (offset + namesz > size) {
-- /*
-- * We're past the end of the buffer.
-- */
-- return doff;
-- }
--
-- offset = ELF_ALIGN(doff + descsz);
-- if (doff + descsz > size) {
-- /*
-- * We're past the end of the buffer.
-- */
-- return (offset >= size) ? offset : size;
-+ if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
-+ type == NT_GNU_BUILD_ID && (descsz == 16 || descsz == 20)) {
-+ uint8_t desc[20];
-+ uint32_t i;
-+ *flags |= FLAGS_DID_BUILD_ID;
-+ if (file_printf(ms, ", BuildID[%s]=", descsz == 16 ? "md5/uuid" :
-+ "sha1") == -1)
-+ return 1;
-+ (void)memcpy(desc, &nbuf[doff], descsz);
-+ for (i = 0; i < descsz; i++)
-+ if (file_printf(ms, "%02x", desc[i]) == -1)
-+ return 1;
-+ return 1;
- }
--
-- if ((*flags & (FLAGS_DID_NOTE|FLAGS_DID_BUILD_ID)) ==
-- (FLAGS_DID_NOTE|FLAGS_DID_BUILD_ID))
-- goto core;
--
-+ return 0;
-+}
-+
-+private int
-+do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
-+ int swap, uint32_t namesz, uint32_t descsz,
-+ size_t noff, size_t doff, int *flags)
-+{
- if (namesz == 5 && strcmp((char *)&nbuf[noff], "SuSE") == 0 &&
-- xnh_type == NT_GNU_VERSION && descsz == 2) {
-+ type == NT_GNU_VERSION && descsz == 2) {
-+ *flags |= FLAGS_DID_OS_NOTE;
- file_printf(ms, ", for SuSE %d.%d", nbuf[doff], nbuf[doff + 1]);
-+ return 1;
- }
-+
- if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
-- xnh_type == NT_GNU_VERSION && descsz == 16) {
-+ type == NT_GNU_VERSION && descsz == 16) {
- uint32_t desc[4];
- (void)memcpy(desc, &nbuf[doff], sizeof(desc));
-
-+ *flags |= FLAGS_DID_OS_NOTE;
- if (file_printf(ms, ", for GNU/") == -1)
-- return size;
-+ return 1;
- switch (elf_getu32(swap, desc[0])) {
- case GNU_OS_LINUX:
- if (file_printf(ms, "Linux") == -1)
-- return size;
-+ return 1;
- break;
- case GNU_OS_HURD:
- if (file_printf(ms, "Hurd") == -1)
-- return size;
-+ return 1;
- break;
- case GNU_OS_SOLARIS:
- if (file_printf(ms, "Solaris") == -1)
-- return size;
-+ return 1;
- break;
- case GNU_OS_KFREEBSD:
- if (file_printf(ms, "kFreeBSD") == -1)
-- return size;
-+ return 1;
- break;
- case GNU_OS_KNETBSD:
- if (file_printf(ms, "kNetBSD") == -1)
-- return size;
-+ return 1;
- break;
- default:
- if (file_printf(ms, "<unknown>") == -1)
-- return size;
-+ return 1;
- }
- if (file_printf(ms, " %d.%d.%d", elf_getu32(swap, desc[1]),
- elf_getu32(swap, desc[2]), elf_getu32(swap, desc[3])) == -1)
-- return size;
-- *flags |= FLAGS_DID_NOTE;
-- return size;
-+ return 1;
-+ return 1;
- }
-
-- if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
-- xnh_type == NT_GNU_BUILD_ID && (descsz == 16 || descsz == 20)) {
-- uint8_t desc[20];
-- uint32_t i;
-- if (file_printf(ms, ", BuildID[%s]=", descsz == 16 ? "md5/uuid" :
-- "sha1") == -1)
-- return size;
-- (void)memcpy(desc, &nbuf[doff], descsz);
-- for (i = 0; i < descsz; i++)
-- if (file_printf(ms, "%02x", desc[i]) == -1)
-- return size;
-- *flags |= FLAGS_DID_BUILD_ID;
-+ if (namesz == 7 && strcmp((char *)&nbuf[noff], "NetBSD") == 0) {
-+ if (type == NT_NETBSD_VERSION && descsz == 4) {
-+ *flags |= FLAGS_DID_OS_NOTE;
-+ do_note_netbsd_version(ms, swap, &nbuf[doff]);
-+ return 1;
-+ }
-+ }
-+
-+ if (namesz == 8 && strcmp((char *)&nbuf[noff], "FreeBSD") == 0) {
-+ if (type == NT_FREEBSD_VERSION && descsz == 4) {
-+ *flags |= FLAGS_DID_OS_NOTE;
-+ do_note_freebsd_version(ms, swap, &nbuf[doff]);
-+ return 1;
-+ }
-+ }
-+
-+ if (namesz == 8 && strcmp((char *)&nbuf[noff], "OpenBSD") == 0 &&
-+ type == NT_OPENBSD_VERSION && descsz == 4) {
-+ *flags |= FLAGS_DID_OS_NOTE;
-+ if (file_printf(ms, ", for OpenBSD") == -1)
-+ return 1;
-+ /* Content of note is always 0 */
-+ return 1;
-+ }
-+
-+ if (namesz == 10 && strcmp((char *)&nbuf[noff], "DragonFly") == 0 &&
-+ type == NT_DRAGONFLY_VERSION && descsz == 4) {
-+ uint32_t desc;
-+ *flags |= FLAGS_DID_OS_NOTE;
-+ if (file_printf(ms, ", for DragonFly") == -1)
-+ return 1;
-+ (void)memcpy(&desc, &nbuf[doff], sizeof(desc));
-+ desc = elf_getu32(swap, desc);
-+ if (file_printf(ms, " %d.%d.%d", desc / 100000,
-+ desc / 10000 % 10, desc % 10000) == -1)
-+ return 1;
-+ return 1;
- }
-+ return 0;
-+}
-+
-+private int
-+do_pax_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
-+ int swap, uint32_t namesz, uint32_t descsz,
-+ size_t noff, size_t doff, int *flags)
-+{
-
- if (namesz == 4 && strcmp((char *)&nbuf[noff], "PaX") == 0 &&
-- xnh_type == NT_NETBSD_PAX && descsz == 4) {
-+ type == NT_NETBSD_PAX && descsz == 4) {
- static const char *pax[] = {
- "+mprotect",
- "-mprotect",
-@@ -595,80 +615,32 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
- size_t i;
- int did = 0;
-
-+ *flags |= FLAGS_DID_NETBSD_PAX;
- (void)memcpy(&desc, &nbuf[doff], sizeof(desc));
- desc = elf_getu32(swap, desc);
-
- if (desc && file_printf(ms, ", PaX: ") == -1)
-- return size;
-+ return 1;
-
- for (i = 0; i < __arraycount(pax); i++) {
- if (((1 << i) & desc) == 0)
- continue;
- if (file_printf(ms, "%s%s", did++ ? "," : "",
- pax[i]) == -1)
-- return size;
-- }
-- }
--
-- if (namesz == 7 && strcmp((char *)&nbuf[noff], "NetBSD") == 0) {
-- switch (xnh_type) {
-- case NT_NETBSD_VERSION:
-- if (descsz == 4) {
-- do_note_netbsd_version(ms, swap, &nbuf[doff]);
-- *flags |= FLAGS_DID_NOTE;
-- return size;
-- }
-- break;
-- case NT_NETBSD_MARCH:
-- if (file_printf(ms, ", compiled for: %.*s", (int)descsz,
-- (const char *)&nbuf[doff]) == -1)
-- return size;
-- break;
-- case NT_NETBSD_CMODEL:
-- if (file_printf(ms, ", compiler model: %.*s",
-- (int)descsz, (const char *)&nbuf[doff]) == -1)
-- return size;
-- break;
-- default:
-- if (file_printf(ms, ", note=%u", xnh_type) == -1)
-- return size;
-- break;
-- }
-- return size;
-- }
--
-- if (namesz == 8 && strcmp((char *)&nbuf[noff], "FreeBSD") == 0) {
-- if (xnh_type == NT_FREEBSD_VERSION && descsz == 4) {
-- do_note_freebsd_version(ms, swap, &nbuf[doff]);
-- *flags |= FLAGS_DID_NOTE;
-- return size;
-+ return 1;
- }
-+ return 1;
- }
-+ return 0;
-+}
-
-- if (namesz == 8 && strcmp((char *)&nbuf[noff], "OpenBSD") == 0 &&
-- xnh_type == NT_OPENBSD_VERSION && descsz == 4) {
-- if (file_printf(ms, ", for OpenBSD") == -1)
-- return size;
-- /* Content of note is always 0 */
-- *flags |= FLAGS_DID_NOTE;
-- return size;
-- }
--
-- if (namesz == 10 && strcmp((char *)&nbuf[noff], "DragonFly") == 0 &&
-- xnh_type == NT_DRAGONFLY_VERSION && descsz == 4) {
-- uint32_t desc;
-- if (file_printf(ms, ", for DragonFly") == -1)
-- return size;
-- (void)memcpy(&desc, &nbuf[doff], sizeof(desc));
-- desc = elf_getu32(swap, desc);
-- if (file_printf(ms, " %d.%d.%d", desc / 100000,
-- desc / 10000 % 10, desc % 10000) == -1)
-- return size;
-- *flags |= FLAGS_DID_NOTE;
-- return size;
-- }
--
--core:
-+private int
-+do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
-+ int swap, uint32_t namesz, uint32_t descsz,
-+ size_t noff, size_t doff, int *flags, size_t size, int clazz)
-+{
-+#ifdef ELFCORE
-+ int os_style = -1;
- /*
- * Sigh. The 2.0.36 kernel in Debian 2.1, at
- * least, doesn't correctly implement name
-@@ -697,20 +669,17 @@ core:
- os_style = OS_STYLE_NETBSD;
- }
-
--#ifdef ELFCORE
-- if ((*flags & FLAGS_DID_CORE) != 0)
-- return size;
--
- if (os_style != -1 && (*flags & FLAGS_DID_CORE_STYLE) == 0) {
- if (file_printf(ms, ", %s-style", os_style_names[os_style])
- == -1)
-- return size;
-+ return 1;
- *flags |= FLAGS_DID_CORE_STYLE;
- }
-
- switch (os_style) {
- case OS_STYLE_NETBSD:
-- if (xnh_type == NT_NETBSD_CORE_PROCINFO) {
-+ if (type == NT_NETBSD_CORE_PROCINFO) {
-+ char sbuf[512];
- uint32_t signo;
- /*
- * Extract the program name. It is at
-@@ -719,7 +688,7 @@ core:
- */
- if (file_printf(ms, ", from '%.31s'",
- &nbuf[doff + 0x7c]) == -1)
-- return size;
-+ return 1;
-
- /*
- * Extract the signal number. It is at
-@@ -729,14 +698,14 @@ core:
- sizeof(signo));
- if (file_printf(ms, " (signal %u)",
- elf_getu32(swap, signo)) == -1)
-- return size;
-+ return 1;
- *flags |= FLAGS_DID_CORE;
-- return size;
-+ return 1;
- }
- break;
-
- default:
-- if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
-+ if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
- size_t i, j;
- unsigned char c;
- /*
-@@ -804,7 +773,7 @@ core:
- * Try next offsets, in case this match is
- * in the middle of a string.
- */
-- for (k = i + 1 ; k < NOFFSETS ; k++) {
-+ for (k = i + 1 ; k < NOFFSETS; k++) {
- size_t no;
- int adjust = 1;
- if (prpsoffsets(k) >= prpsoffsets(i))
-@@ -829,9 +798,9 @@ core:
- cp--;
- if (file_printf(ms, ", from '%.*s'",
- (int)(cp - cname), cname) == -1)
-- return size;
-+ return 1;
- *flags |= FLAGS_DID_CORE;
-- return size;
-+ return 1;
-
- tryanother:
- ;
-@@ -840,6 +809,129 @@ core:
- break;
- }
- #endif
-+ return 0;
-+}
-+
-+private size_t
-+donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
-+ int clazz, int swap, size_t align, int *flags, uint16_t *notecount)
-+{
-+ Elf32_Nhdr nh32;
-+ Elf64_Nhdr nh64;
-+ size_t noff, doff;
-+ uint32_t namesz, descsz;
-+ unsigned char *nbuf = CAST(unsigned char *, vbuf);
-+
-+ if (*notecount == 0)
-+ return 0;
-+ --*notecount;
-+
-+ if (xnh_sizeof + offset > size) {
-+ /*
-+ * We're out of note headers.
-+ */
-+ return xnh_sizeof + offset;
-+ }
-+
-+ (void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
-+ offset += xnh_sizeof;
-+
-+ namesz = xnh_namesz;
-+ descsz = xnh_descsz;
-+ if ((namesz == 0) && (descsz == 0)) {
-+ /*
-+ * We're out of note headers.
-+ */
-+ return (offset >= size) ? offset : size;
-+ }
-+
-+ if (namesz & 0x80000000) {
-+ (void)file_printf(ms, ", bad note name size 0x%lx",
-+ (unsigned long)namesz);
-+ return 0;
-+ }
-+
-+ if (descsz & 0x80000000) {
-+ (void)file_printf(ms, ", bad note description size 0x%lx",
-+ (unsigned long)descsz);
-+ return 0;
-+ }
-+
-+ noff = offset;
-+ doff = ELF_ALIGN(offset + namesz);
-+
-+ if (offset + namesz > size) {
-+ /*
-+ * We're past the end of the buffer.
-+ */
-+ return doff;
-+ }
-+
-+ offset = ELF_ALIGN(doff + descsz);
-+ if (doff + descsz > size) {
-+ /*
-+ * We're past the end of the buffer.
-+ */
-+ return (offset >= size) ? offset : size;
-+ }
-+
-+ if ((*flags & FLAGS_DID_OS_NOTE) == 0) {
-+ if (do_os_note(ms, nbuf, xnh_type, swap,
-+ namesz, descsz, noff, doff, flags))
-+ return size;
-+ }
-+
-+ if ((*flags & FLAGS_DID_BUILD_ID) == 0) {
-+ if (do_bid_note(ms, nbuf, xnh_type, swap,
-+ namesz, descsz, noff, doff, flags))
-+ return size;
-+ }
-+
-+ if ((*flags & FLAGS_DID_NETBSD_PAX) == 0) {
-+ if (do_pax_note(ms, nbuf, xnh_type, swap,
-+ namesz, descsz, noff, doff, flags))
-+ return size;
-+ }
-+
-+ if ((*flags & FLAGS_DID_CORE) == 0) {
-+ if (do_core_note(ms, nbuf, xnh_type, swap,
-+ namesz, descsz, noff, doff, flags, size, clazz))
-+ return size;
-+ }
-+
-+ if (namesz == 7 && strcmp((char *)&nbuf[noff], "NetBSD") == 0) {
-+ if (descsz > 100)
-+ descsz = 100;
-+ switch (xnh_type) {
-+ case NT_NETBSD_VERSION:
-+ return size;
-+ case NT_NETBSD_MARCH:
-+ if (*flags & FLAGS_DID_NETBSD_MARCH)
-+ return size;
-+ *flags |= FLAGS_DID_NETBSD_MARCH;
-+ if (file_printf(ms, ", compiled for: %.*s",
-+ (int)descsz, (const char *)&nbuf[doff]) == -1)
-+ return size;
-+ break;
-+ case NT_NETBSD_CMODEL:
-+ if (*flags & FLAGS_DID_NETBSD_CMODEL)
-+ return size;
-+ *flags |= FLAGS_DID_NETBSD_CMODEL;
-+ if (file_printf(ms, ", compiler model: %.*s",
-+ (int)descsz, (const char *)&nbuf[doff]) == -1)
-+ return size;
-+ break;
-+ default:
-+ if (*flags & FLAGS_DID_NETBSD_UNKNOWN)
-+ return size;
-+ *flags |= FLAGS_DID_NETBSD_UNKNOWN;
-+ if (file_printf(ms, ", note=%u", xnh_type) == -1)
-+ return size;
-+ break;
-+ }
-+ return size;
-+ }
-+
- return offset;
- }
-
-@@ -895,16 +987,19 @@ static const cap_desc_t cap_desc_386[] = {
-
- private int
- doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
-- size_t size, off_t fsize, int *flags, int mach, int strtab)
-+ size_t size, off_t fsize, int mach, int strtab, int *flags,
-+ uint16_t *notecount)
- {
- Elf32_Shdr sh32;
- Elf64_Shdr sh64;
- int stripped = 1;
-+ size_t nbadcap = 0;
- void *nbuf;
- off_t noff, coff, name_off;
- uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */
- uint64_t cap_sf1 = 0; /* SunOS 5.x software capabilites */
- char name[50];
-+ ssize_t namesize;
-
- if (size != xsh_sizeof) {
- if (file_printf(ms, ", corrupted section header size") == -1)
-@@ -913,7 +1008,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- }
-
- /* Read offset of name section to be able to read section names later */
-- if (pread(fd, xsh_addr, xsh_sizeof, off + size * strtab) == -1) {
-+ if (pread(fd, xsh_addr, xsh_sizeof, off + size * strtab) < (ssize_t)xsh_sizeof) {
- file_badread(ms);
- return -1;
- }
-@@ -921,15 +1016,15 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
-
- for ( ; num; num--) {
- /* Read the name of this section. */
-- if (pread(fd, name, sizeof(name), name_off + xsh_name) == -1) {
-+ if ((namesize = pread(fd, name, sizeof(name) - 1, name_off + xsh_name)) == -1) {
- file_badread(ms);
- return -1;
- }
-- name[sizeof(name) - 1] = '\0';
-+ name[namesize] = '\0';
- if (strcmp(name, ".debug_info") == 0)
- stripped = 0;
-
-- if (pread(fd, xsh_addr, xsh_sizeof, off) == -1) {
-+ if (pread(fd, xsh_addr, xsh_sizeof, off) < (ssize_t)xsh_sizeof) {
- file_badread(ms);
- return -1;
- }
-@@ -944,7 +1039,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- stripped = 0;
- break;
- default:
-- if (xsh_offset > fsize) {
-+ if (fsize != SIZE_UNKNOWN && xsh_offset > fsize) {
- /* Perhaps warn here */
- continue;
- }
-@@ -959,7 +1054,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- " for note");
- return -1;
- }
-- if (pread(fd, nbuf, xsh_size, xsh_offset) == -1) {
-+ if (pread(fd, nbuf, xsh_size, xsh_offset) < (ssize_t)xsh_size) {
- file_badread(ms);
- free(nbuf);
- return -1;
-@@ -970,7 +1065,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- if (noff >= (off_t)xsh_size)
- break;
- noff = donote(ms, nbuf, (size_t)noff,
-- xsh_size, clazz, swap, 4, flags);
-+ xsh_size, clazz, swap, 4, flags, notecount);
- if (noff == 0)
- break;
- }
-@@ -988,6 +1083,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- goto skip;
- }
-
-+ if (nbadcap > 5)
-+ break;
- if (lseek(fd, xsh_offset, SEEK_SET) == (off_t)-1) {
- file_badseek(ms);
- return -1;
-@@ -1023,6 +1120,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- (unsigned long long)xcap_tag,
- (unsigned long long)xcap_val) == -1)
- return -1;
-+ if (nbadcap++ > 2)
-+ coff = xsh_size;
- break;
- }
- }
-@@ -1103,7 +1202,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- */
- private int
- dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
-- int num, size_t size, off_t fsize, int *flags, int sh_num)
-+ int num, size_t size, off_t fsize, int sh_num, int *flags,
-+ uint16_t *notecount)
- {
- Elf32_Phdr ph32;
- Elf64_Phdr ph64;
-@@ -1120,7 +1220,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- }
-
- for ( ; num; num--) {
-- if (pread(fd, xph_addr, xph_sizeof, off) == -1) {
-+ if (pread(fd, xph_addr, xph_sizeof, off) < (ssize_t)xph_sizeof) {
- file_badread(ms);
- return -1;
- }
-@@ -1136,7 +1236,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- shared_libraries = " (uses shared libs)";
- break;
- default:
-- if (xph_offset > fsize) {
-+ if (fsize != SIZE_UNKNOWN && xph_offset > fsize) {
- /* Maybe warn here? */
- continue;
- }
-@@ -1172,7 +1272,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- break;
- offset = donote(ms, nbuf, offset,
- (size_t)bufsize, clazz, swap, align,
-- flags);
-+ flags, notecount);
- if (offset == 0)
- break;
- }
-@@ -1203,7 +1303,7 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
- int flags = 0;
- Elf32_Ehdr elf32hdr;
- Elf64_Ehdr elf64hdr;
-- uint16_t type;
-+ uint16_t type, phnum, shnum, notecount;
-
- if (ms->flags & (MAGIC_MIME|MAGIC_APPLE))
- return 0;
-@@ -1229,7 +1329,10 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
- file_badread(ms);
- return -1;
- }
-- fsize = st.st_size;
-+ if (S_ISREG(st.st_mode))
-+ fsize = st.st_size;
-+ else
-+ fsize = SIZE_UNKNOWN;
-
- clazz = buf[EI_CLASS];
-
-diff --git a/src/softmagic.c b/src/softmagic.c
-index eaa0f6b..9b11b93 100644
---- a/src/softmagic.c
-+++ b/src/softmagic.c
-@@ -48,11 +48,11 @@ FILE_RCSID("@(#)$File: softmagic.c,v 1.180 2014/03/15 21:47:40 christos Exp $")
-
-
- private int match(struct magic_set *, struct magic *, uint32_t,
-- const unsigned char *, size_t, size_t, int, int, int, int, int *, int *,
-- int *);
-+ const unsigned char *, size_t, size_t, int, int, int, uint16_t,
-+ uint16_t *, int *, int *, int *);
- private int mget(struct magic_set *, const unsigned char *,
-- struct magic *, size_t, size_t, unsigned int, int, int, int, int, int *,
-- int *, int *);
-+ struct magic *, size_t, size_t, unsigned int, int, int, int, uint16_t,
-+ uint16_t *, int *, int *, int *);
- private int magiccheck(struct magic_set *, struct magic *);
- private int32_t mprint(struct magic_set *, struct magic *);
- private int32_t moffset(struct magic_set *, struct magic *);
-@@ -68,6 +68,7 @@ private void cvt_32(union VALUETYPE *, const struct magic *);
- private void cvt_64(union VALUETYPE *, const struct magic *);
-
- #define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
-+
- /*
- * softmagic - lookup one file in parsed, in-memory copy of database
- * Passed the name and FILE * of one file to be typed.
-@@ -75,14 +76,20 @@ private void cvt_64(union VALUETYPE *, const struct magic *);
- /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
- protected int
- file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
-- size_t level, int mode, int text)
-+ uint16_t indir_level, uint16_t *name_count, int mode, int text)
- {
- struct mlist *ml;
- int rv, printed_something = 0, need_separator = 0;
-+ uint16_t nc;
-+
-+ if (name_count == NULL) {
-+ nc = 0;
-+ name_count = &nc;
-+ }
- for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
- if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
-- text, 0, level, &printed_something, &need_separator,
-- NULL)) != 0)
-+ text, 0, indir_level, name_count,
-+ &printed_something, &need_separator, NULL)) != 0)
- return rv;
-
- return 0;
-@@ -118,8 +125,8 @@ file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
- private int
- match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
- const unsigned char *s, size_t nbytes, size_t offset, int mode, int text,
-- int flip, int recursion_level, int *printed_something, int *need_separator,
-- int *returnval)
-+ int flip, uint16_t indir_level, uint16_t *name_count,
-+ int *printed_something, int *need_separator, int *returnval)
- {
- uint32_t magindex = 0;
- unsigned int cont_level = 0;
-@@ -156,8 +163,8 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
-
- /* if main entry matches, print it... */
- switch (mget(ms, s, m, nbytes, offset, cont_level, mode, text,
-- flip, recursion_level + 1, printed_something,
-- need_separator, returnval)) {
-+ flip, indir_level, name_count,
-+ printed_something, need_separator, returnval)) {
- case -1:
- return -1;
- case 0:
-@@ -245,8 +252,8 @@ match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
- }
- #endif
- switch (mget(ms, s, m, nbytes, offset, cont_level, mode,
-- text, flip, recursion_level + 1, printed_something,
-- need_separator, returnval)) {
-+ text, flip, indir_level, name_count,
-+ printed_something, need_separator, returnval)) {
- case -1:
- return -1;
- case 0:
-@@ -1155,18 +1162,26 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
- private int
- mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
- size_t nbytes, size_t o, unsigned int cont_level, int mode, int text,
-- int flip, int recursion_level, int *printed_something,
-- int *need_separator, int *returnval)
-+ int flip, uint16_t indir_level, uint16_t *name_count,
-+ int *printed_something, int *need_separator, int *returnval)
- {
-- uint32_t soffset, offset = ms->offset;
-+ uint32_t offset = ms->offset;
- uint32_t count = m->str_range;
-+ file_pushbuf_t *pb;
- int rv, oneed_separator, in_type;
-- char *sbuf, *rbuf;
-+ char *rbuf;
- union VALUETYPE *p = &ms->ms_value;
- struct mlist ml;
-
-- if (recursion_level >= 20) {
-- file_error(ms, 0, "recursion nesting exceeded");
-+ if (indir_level >= ms->indir_max) {
-+ file_error(ms, 0, "indirect recursion nesting (%hu) exceeded",
-+ indir_level);
-+ return -1;
-+ }
-+
-+ if (*name_count >= ms->name_max) {
-+ file_error(ms, 0, "name use count (%hu) exceeded",
-+ *name_count);
- return -1;
- }
-
-@@ -1678,6 +1693,10 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
- ms->offset = offset;
-
- if ((ms->flags & MAGIC_DEBUG) != 0) {
-+ fprintf(stderr, "mget(type=%d, flag=%x, offset=%u, o=%zu, "
-+ "nbytes=%zu, il=%hu, nc=%hu)\n",
-+ m->type, m->flag, offset, o, nbytes,
-+ indir_level, *name_count);
- mdebug(offset, (char *)(void *)p,
- sizeof(union VALUETYPE));
- #ifndef COMPILE_ONLY
-@@ -1741,19 +1760,23 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
- case FILE_INDIRECT:
- if (offset == 0)
- return 0;
-+
- if (nbytes < offset)
- return 0;
-- sbuf = ms->o.buf;
-- soffset = ms->offset;
-- ms->o.buf = NULL;
-- ms->offset = 0;
-+
-+ if ((pb = file_push_buffer(ms)) == NULL)
-+ return -1;
-+
- rv = file_softmagic(ms, s + offset, nbytes - offset,
-- recursion_level, BINTEST, text);
-+ indir_level + 1, name_count, BINTEST, text);
-+
- if ((ms->flags & MAGIC_DEBUG) != 0)
- fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
-- rbuf = ms->o.buf;
-- ms->o.buf = sbuf;
-- ms->offset = soffset;
-+
-+ rbuf = file_pop_buffer(ms, pb);
-+ if (rbuf == NULL && ms->event_flags & EVENT_HAD_ERR)
-+ return -1;
-+
- if (rv == 1) {
- if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
- file_printf(ms, F(m->desc, "%u"), offset) == -1) {
-@@ -1771,22 +1794,22 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
- case FILE_USE:
- if (nbytes < offset)
- return 0;
-- sbuf = m->value.s;
-- if (*sbuf == '^') {
-- sbuf++;
-+ rbuf = m->value.s;
-+ if (*rbuf == '^') {
-+ rbuf++;
- flip = !flip;
- }
-- if (file_magicfind(ms, sbuf, &ml) == -1) {
-- file_error(ms, 0, "cannot find entry `%s'", sbuf);
-+ if (file_magicfind(ms, rbuf, &ml) == -1) {
-+ file_error(ms, 0, "cannot find entry `%s'", rbuf);
- return -1;
- }
--
-+ (*name_count)++;
- oneed_separator = *need_separator;
- if (m->flag & NOSPACE)
- *need_separator = 0;
- rv = match(ms, ml.magic, ml.nmagic, s, nbytes, offset + o,
-- mode, text, flip, recursion_level, printed_something,
-- need_separator, returnval);
-+ mode, text, flip, indir_level, name_count,
-+ printed_something, need_separator, returnval);
- if (rv != 1)
- *need_separator = oneed_separator;
- return rv;
---
-1.9.1
-
diff --git a/meta/recipes-devtools/file/file_5.18.bb b/meta/recipes-devtools/file/file_5.22.bb
index d6e7d61d79..9c6bb38d71 100644
--- a/meta/recipes-devtools/file/file_5.18.bb
+++ b/meta/recipes-devtools/file/file_5.22.bb
@@ -13,11 +13,10 @@ DEPENDS_class-native = "zlib-native"
SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
file://debian-742262.patch \
- file://file-CVE-2014-9620-and-CVE-2014-9621.patch \
"
-SRC_URI[md5sum] = "d420d8f2990cd344673acfbf8d76ff5a"
-SRC_URI[sha256sum] = "6519fb706d583231c2419592ebecdbb21d33c62eaf7a1a0b24ddfcb80c08bf07"
+SRC_URI[md5sum] = "8fb13e5259fe447e02c4a37bc7225add"
+SRC_URI[sha256sum] = "c4e3a8e44cb888c5e4b476e738503e37fb9de3b25a38c143e214bfc12109fc0b"
inherit autotools
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch b/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
deleted file mode 100644
index e4fff127b3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/0051-fix-unwind-race.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-These is a race over the installation of files into the include/ directory between:
-
-| (cd `${PWDCMD-pwd}`/include ; \| tar -cf - .; exit 0) | (cd /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include; tar xpf - )
-
-and
-
-| /bin/install -c -m 644 unwind.h /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include
-| /bin/install: cannot create regular file '/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/gcc-cross-initial/4.8.2-r0/image/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-oecore/build/build/tmp-eglibc/sysroots/x86_64-linux/usr/lib/armv5te-oe-linux-gnueabi.gcc-cross-initial/gcc/arm-oe-linux-gnueabi/4.8.2/include/unwind.h': File exists
-| make[1]: *** [install-unwind_h] Error 1
-
-which under the right circumstances leads to the above build failure. Since we don't
-need two copies of this file and we don't use install-no-fixincludes, we can disable
-the libgcc installation.
-
-RP 2014/04/10
-
-Upstream-Status: Pending [would need a rewrite into an acceptable patch form]
-
-Index: gcc-4.8.2/libgcc/Makefile.in
-===================================================================
---- gcc-4.8.2.orig/libgcc/Makefile.in 2013-02-04 19:06:20.000000000 +0000
-+++ gcc-4.8.2/libgcc/Makefile.in 2014-04-10 09:58:33.018748787 +0000
-@@ -1020,8 +1020,8 @@
- # This is however useful for "install-no-fixincludes" case, when only the gcc
- # internal headers are copied by gcc's install.
- install-unwind_h:
-- $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-- $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-+# $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
-+# $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
-
- all: install-unwind_h-forbuild
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc
index c88a496598..3af87d1cc6 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.9.inc
@@ -2,11 +2,11 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
-PV = "4.9.1"
+PV = "4.9.2"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "4.9.1"
+BINV = "4.9.2"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-4.9:"
@@ -67,16 +67,19 @@ SRC_URI = "\
file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
file://0051-eabispe.patch \
+ file://0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch \
file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \
- file://0055-PR-rtl-optimization-61801.patch \
- file://0056-top-level-reorder_gcc-bug-61144.patch \
+ file://0055-dwarf-reg-processing-helper.patch \
+ file://0056-define-default-cfa-register-mapping.patch \
+ file://0057-aarch64-config.patch \
file://0058-gcc-r212171.patch \
file://0059-gcc-PR-rtl-optimization-63348.patch \
- file://target-gcc-includedir.patch \
+ file://0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch \
+ file://0061-target-gcc-includedir.patch \
"
-SRC_URI[md5sum] = "fddf71348546af523353bd43d34919c1"
-SRC_URI[sha256sum] = "d334781a124ada6f38e63b545e2a3b8c2183049515a1abab6d513f109f1d717e"
+SRC_URI[md5sum] = "4df8ee253b7f3863ad0b86359cd39c43"
+SRC_URI[sha256sum] = "2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
@@ -124,10 +127,8 @@ EXTRA_OECONF_INTERMEDIATE = "\
EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \
- --with-sysroot=${STAGING_DIR_TARGET} \
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${STAGING_DIR_TARGET} \
"
-
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
index ba0a2278b7..37c46fc2e2 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
@@ -11,26 +11,34 @@ Upstream-Status: Pending
gcc/config/arm/linux-elf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: gcc-4.9-20140316/gcc/config/arm/coff.h
+Index: gcc-4.9.2/gcc/config/arm/coff.h
===================================================================
---- gcc-4.9-20140316.orig/gcc/config/arm/coff.h
-+++ gcc-4.9-20140316/gcc/config/arm/coff.h
-@@ -33,7 +33,7 @@
+--- gcc-4.9.2.orig/gcc/config/arm/coff.h
++++ gcc-4.9.2/gcc/config/arm/coff.h
+@@ -32,8 +32,11 @@
+ #define TARGET_DEFAULT (MASK_APCS_FRAME)
#ifndef MULTILIB_DEFAULTS
++#ifndef TARGET_ENDIAN_OPTION
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#endif
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork" }
#endif
/* This is COFF, but prefer stabs. */
-Index: gcc-4.9-20140316/gcc/config/arm/elf.h
+Index: gcc-4.9.2/gcc/config/arm/elf.h
===================================================================
---- gcc-4.9-20140316.orig/gcc/config/arm/elf.h
-+++ gcc-4.9-20140316/gcc/config/arm/elf.h
-@@ -112,7 +112,7 @@
+--- gcc-4.9.2.orig/gcc/config/arm/elf.h
++++ gcc-4.9.2/gcc/config/arm/elf.h
+@@ -116,8 +116,11 @@
+ #endif
#ifndef MULTILIB_DEFAULTS
++#ifndef TARGET_ENDIAN_OPTION
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#endif
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
+ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch b/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch
new file mode 100644
index 0000000000..f6958b32c9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch
@@ -0,0 +1,138 @@
+From d626297e87e19251a284ea1e9360e831b48999ca Mon Sep 17 00:00:00 2001
+From: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 4 Sep 2014 08:32:05 +0000
+Subject: [PATCH] Add target hook to override DWARF2 frame register size
+
+gcc/
+
+ * target.def (TARGET_DWARF_FRAME_REG_MODE): New target hook.
+ * targhooks.c (default_dwarf_frame_reg_mode): New function.
+ * targhooks.h (default_dwarf_frame_reg_mode): New prototype.
+ * doc/tm.texi.in (TARGET_DWARF_FRAME_REG_MODE): Document.
+ * doc/tm.texi: Regenerate.
+ * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Abstract mode
+ selection logic to default_dwarf_frame_reg_mode.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214898 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [gcc 5.0]
+
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/doc/tm.texi | 7 +++++++
+ gcc/doc/tm.texi.in | 2 ++
+ gcc/dwarf2cfi.c | 4 +---
+ gcc/target.def | 11 +++++++++++
+ gcc/targhooks.c | 13 +++++++++++++
+ gcc/targhooks.h | 1 +
+ 7 files changed, 45 insertions(+), 3 deletions(-)
+
+Index: gcc-4.9.2/gcc/doc/tm.texi
+===================================================================
+--- gcc-4.9.2.orig/gcc/doc/tm.texi
++++ gcc-4.9.2/gcc/doc/tm.texi
+@@ -9017,6 +9017,13 @@ register in Dwarf. Otherwise, this hook
+ If not defined, the default is to return @code{NULL_RTX}.
+ @end deftypefn
+
++@deftypefn {Target Hook} {enum machine_mode} TARGET_DWARF_FRAME_REG_MODE (int @var{regno})
++Given a register, this hook should return the mode which the
++corresponding Dwarf frame register should have. This is normally
++used to return a smaller mode than the raw mode to prevent call
++clobbered parts of a register altering the frame register size
++@end deftypefn
++
+ @deftypefn {Target Hook} void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree @var{address})
+ If some registers are represented in Dwarf-2 unwind information in
+ multiple pieces, define this hook to fill in information about the
+Index: gcc-4.9.2/gcc/doc/tm.texi.in
+===================================================================
+--- gcc-4.9.2.orig/gcc/doc/tm.texi.in
++++ gcc-4.9.2/gcc/doc/tm.texi.in
+@@ -6745,6 +6745,8 @@ the target supports DWARF 2 frame unwind
+
+ @hook TARGET_DWARF_REGISTER_SPAN
+
++@hook TARGET_DWARF_FRAME_REG_MODE
++
+ @hook TARGET_INIT_DWARF_REG_SIZES_EXTRA
+
+ @hook TARGET_ASM_TTYPE
+Index: gcc-4.9.2/gcc/dwarf2cfi.c
+===================================================================
+--- gcc-4.9.2.orig/gcc/dwarf2cfi.c
++++ gcc-4.9.2/gcc/dwarf2cfi.c
+@@ -271,11 +271,9 @@ expand_builtin_init_dwarf_reg_sizes (tre
+ if (rnum < DWARF_FRAME_REGISTERS)
+ {
+ HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
+- enum machine_mode save_mode = reg_raw_mode[i];
+ HOST_WIDE_INT size;
++ enum machine_mode save_mode = targetm.dwarf_frame_reg_mode (i);
+
+- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
+- save_mode = choose_hard_reg_mode (i, 1, true);
+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
+ {
+ if (save_mode == VOIDmode)
+Index: gcc-4.9.2/gcc/target.def
+===================================================================
+--- gcc-4.9.2.orig/gcc/target.def
++++ gcc-4.9.2/gcc/target.def
+@@ -3218,6 +3218,17 @@ If not defined, the default is to return
+ rtx, (rtx reg),
+ hook_rtx_rtx_null)
+
++/* Given a register return the mode of the corresponding DWARF frame
++ register. */
++DEFHOOK
++(dwarf_frame_reg_mode,
++ "Given a register, this hook should return the mode which the\n\
++corresponding Dwarf frame register should have. This is normally\n\
++used to return a smaller mode than the raw mode to prevent call\n\
++clobbered parts of a register altering the frame register size",
++ enum machine_mode, (int regno),
++ default_dwarf_frame_reg_mode)
++
+ /* If expand_builtin_init_dwarf_reg_sizes needs to fill in table
+ entries not corresponding directly to registers below
+ FIRST_PSEUDO_REGISTER, this hook should generate the necessary
+Index: gcc-4.9.2/gcc/targhooks.c
+===================================================================
+--- gcc-4.9.2.orig/gcc/targhooks.c
++++ gcc-4.9.2/gcc/targhooks.c
+@@ -1438,6 +1438,19 @@ default_debug_unwind_info (void)
+ return UI_NONE;
+ }
+
++/* Determine the correct mode for a Dwarf frame register that represents
++ register REGNO. */
++
++enum machine_mode
++default_dwarf_frame_reg_mode (int regno)
++{
++ enum machine_mode save_mode = reg_raw_mode[regno];
++
++ if (HARD_REGNO_CALL_PART_CLOBBERED (regno, save_mode))
++ save_mode = choose_hard_reg_mode (regno, 1, true);
++ return save_mode;
++}
++
+ /* To be used by targets where reg_raw_mode doesn't return the right
+ mode for registers used in apply_builtin_return and apply_builtin_arg. */
+
+Index: gcc-4.9.2/gcc/targhooks.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/targhooks.h
++++ gcc-4.9.2/gcc/targhooks.h
+@@ -194,6 +194,7 @@ extern int default_label_align_max_skip
+ extern int default_jump_align_max_skip (rtx);
+ extern section * default_function_section(tree decl, enum node_frequency freq,
+ bool startup, bool exit);
++extern enum machine_mode default_dwarf_frame_reg_mode (int);
+ extern enum machine_mode default_get_reg_raw_mode (int);
+
+ extern void *default_get_pch_validity (size_t *);
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch b/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
deleted file mode 100644
index b27abdef38..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0055-PR-rtl-optimization-61801.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 556537c4ad0df4cbebb74197bb2bdea75cf5dd35 Mon Sep 17 00:00:00 2001
-From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 17 Jul 2014 07:48:49 +0000
-Subject: [PATCH] 2014-07-17 Richard Biener <rguenther@suse.de>
-
- PR rtl-optimization/61801
- * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
- ASM_INPUT don't set reg_pending_barrier if it appears in a
- debug-insn.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212739 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801]
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
-
----
- gcc/sched-deps.c | 3 ++-
-
-diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
-index efc4223..df29bd3 100644
---- a/gcc/sched-deps.c
-+++ b/gcc/sched-deps.c
-@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
- Consider for instance a volatile asm that changes the fpu rounding
- mode. An insn should not be moved across this even if it only uses
- pseudo-regs because it might give an incorrectly rounded result. */
-- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
-+ && !DEBUG_INSN_P (insn))
- reg_pending_barrier = TRUE_BARRIER;
-
- /* For all ASM_OPERANDS, we must traverse the vector of input operands.
---
-1.8.5.5
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch b/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch
new file mode 100644
index 0000000000..557dab0f31
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch
@@ -0,0 +1,148 @@
+From 4fd39f1329379e00f958394adde6be96f0caf21f Mon Sep 17 00:00:00 2001
+From: hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 5 Dec 2014 16:53:22 +0000
+Subject: [PATCH] 2014-12-05 Olivier Hainque <hainque@adacore.com>
+
+ * dwarf2cfi.c (init_one_dwarf_reg_size): New helper, processing
+ one particular reg for expand_builtin_init_dwarf_reg_sizes.
+ (expand_builtin_init_dwarf_reg_sizes): Rework to use helper and
+ account for dwarf register spans.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218428 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [gcc 5.0]
+
+---
+ gcc/ChangeLog | 7 +++++
+ gcc/dwarf2cfi.c | 98 +++++++++++++++++++++++++++++++++++++++++++++------------
+ 2 files changed, 85 insertions(+), 20 deletions(-)
+
+Index: gcc-4.9.2/gcc/dwarf2cfi.c
+===================================================================
+--- gcc-4.9.2.orig/gcc/dwarf2cfi.c
++++ gcc-4.9.2/gcc/dwarf2cfi.c
+@@ -252,7 +252,59 @@ init_return_column_size (enum machine_mo
+ gen_int_mode (size, mode));
+ }
+
+-/* Generate code to initialize the register size table. */
++/* Datastructure used by expand_builtin_init_dwarf_reg_sizes and
++ init_one_dwarf_reg_size to communicate on what has been done by the
++ latter. */
++
++typedef struct
++{
++ /* Whether the dwarf return column was initialized. */
++ bool wrote_return_column;
++
++ /* For each hard register REGNO, whether init_one_dwarf_reg_size
++ was given REGNO to process already. */
++ bool processed_regno [FIRST_PSEUDO_REGISTER];
++
++} init_one_dwarf_reg_state;
++
++/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
++ initialize the dwarf register size table entry corresponding to register
++ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode to
++ use for the size entry to initialize, and INIT_STATE is the communication
++ datastructure conveying what we're doing to our caller. */
++
++static
++void init_one_dwarf_reg_size (int regno, machine_mode regmode,
++ rtx table, machine_mode slotmode,
++ init_one_dwarf_reg_state *init_state)
++{
++ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
++ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
++
++ const HOST_WIDE_INT slotoffset = rnum * GET_MODE_SIZE (slotmode);
++ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
++
++ init_state->processed_regno[regno] = true;
++
++ if (rnum >= DWARF_FRAME_REGISTERS)
++ return;
++
++ if (dnum == DWARF_FRAME_RETURN_COLUMN)
++ {
++ if (regmode == VOIDmode)
++ return;
++ init_state->wrote_return_column = true;
++ }
++
++ if (slotoffset < 0)
++ return;
++
++ emit_move_insn (adjust_address (table, slotmode, slotoffset),
++ gen_int_mode (regsize, slotmode));
++}
++
++/* Generate code to initialize the dwarf register size table located
++ at the provided ADDRESS. */
+
+ void
+ expand_builtin_init_dwarf_reg_sizes (tree address)
+@@ -261,35 +313,40 @@ expand_builtin_init_dwarf_reg_sizes (tre
+ enum machine_mode mode = TYPE_MODE (char_type_node);
+ rtx addr = expand_normal (address);
+ rtx mem = gen_rtx_MEM (BLKmode, addr);
+- bool wrote_return_column = false;
++
++ init_one_dwarf_reg_state init_state;
++
++ memset ((char *)&init_state, 0, sizeof (init_state));
+
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ {
+- unsigned int dnum = DWARF_FRAME_REGNUM (i);
+- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
+-
+- if (rnum < DWARF_FRAME_REGISTERS)
+- {
+- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
+- HOST_WIDE_INT size;
+- enum machine_mode save_mode = targetm.dwarf_frame_reg_mode (i);
++ machine_mode save_mode;
++ rtx span;
+
+- if (dnum == DWARF_FRAME_RETURN_COLUMN)
++ /* No point in processing a register multiple times. This could happen
++ with register spans, e.g. when a reg is first processed as a piece of
++ a span, then as a register on its own later on. */
++
++ if (init_state.processed_regno[i])
++ continue;
++
++ save_mode = targetm.dwarf_frame_reg_mode (i);
++ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
++ if (!span)
++ init_one_dwarf_reg_size (i, save_mode, mem, mode, &init_state);
++ else
++ {
++ for (int si = 0; si < XVECLEN (span, 0); si++)
+ {
+- if (save_mode == VOIDmode)
+- continue;
+- wrote_return_column = true;
+- }
+- size = GET_MODE_SIZE (save_mode);
+- if (offset < 0)
+- continue;
++ rtx reg = XVECEXP (span, 0, si);
++ init_one_dwarf_reg_size
++ (REGNO (reg), GET_MODE (reg), mem, mode, &init_state);
++ }
+
+- emit_move_insn (adjust_address (mem, mode, offset),
+- gen_int_mode (size, mode));
+ }
+ }
+
+- if (!wrote_return_column)
++ if (!init_state.wrote_return_column)
+ init_return_column_size (mode, mem, DWARF_FRAME_RETURN_COLUMN);
+
+ #ifdef DWARF_ALT_FRAME_RETURN_COLUMN
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch b/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch
new file mode 100644
index 0000000000..3b6c94c492
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch
@@ -0,0 +1,75 @@
+From c0235a33de8c4f78cce35b2a8c2035c83fe1bd14 Mon Sep 17 00:00:00 2001
+From: hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 5 Dec 2014 17:01:42 +0000
+Subject: [PATCH] 2014-12-05 Olivier Hainque <hainque@adacore.com>
+
+ gcc/
+ * defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default.
+ * dwarf2cfi.c (init_one_dwarf_reg_size): Honor
+ DWARF_REG_TO_UNWIND_COLUMN.
+
+ libgcc/
+ * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Remove default def,
+ now provided by defaults.h.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218429 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [gcc 5.0]
+
+---
+ gcc/ChangeLog | 6 ++++++
+ gcc/defaults.h | 5 +++++
+ gcc/dwarf2cfi.c | 3 ++-
+ libgcc/ChangeLog | 5 +++++
+ libgcc/unwind-dw2.c | 4 ----
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+Index: gcc-4.9.2/gcc/defaults.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/defaults.h
++++ gcc-4.9.2/gcc/defaults.h
+@@ -438,6 +438,11 @@ see the files COPYING3 and COPYING.RUNTI
+ #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
+ #endif
+
++/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
++#ifndef DWARF_REG_TO_UNWIND_COLUMN
++#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
++#endif
++
+ /* Map register numbers held in the call frame info that gcc has
+ collected using DWARF_FRAME_REGNUM to those that should be output in
+ .debug_frame and .eh_frame. */
+Index: gcc-4.9.2/gcc/dwarf2cfi.c
+===================================================================
+--- gcc-4.9.2.orig/gcc/dwarf2cfi.c
++++ gcc-4.9.2/gcc/dwarf2cfi.c
+@@ -280,8 +280,9 @@ void init_one_dwarf_reg_size (int regno,
+ {
+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
++ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
+
+- const HOST_WIDE_INT slotoffset = rnum * GET_MODE_SIZE (slotmode);
++ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
+
+ init_state->processed_regno[regno] = true;
+Index: gcc-4.9.2/libgcc/unwind-dw2.c
+===================================================================
+--- gcc-4.9.2.orig/libgcc/unwind-dw2.c
++++ gcc-4.9.2/libgcc/unwind-dw2.c
+@@ -55,10 +55,6 @@
+ #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
+ #endif
+
+-#ifndef DWARF_REG_TO_UNWIND_COLUMN
+-#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
+-#endif
+-
+ /* ??? For the public function interfaces, we tend to gcc_assert that the
+ column numbers are in range. For the dwarf2 unwind info this does happen,
+ although so far in a case that doesn't actually matter.
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
deleted file mode 100644
index f44893251c..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Upstream-Status: Backport
-
-Originally-submitted-by: Peter Urbanec <openembedded-devel@urbanec.net>
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
---- /dev/null
-+++ b/meta/recipes-devtools/gcc/gcc-4.9/0056-top-level-reorder_gcc-bug-61144.patch
-@@ -0,0 +1,21 @@
-+--- a/gcc/varpool.c 2014/10/05 02:50:01 215895
-++++ b/gcc/varpool.c 2014/10/05 04:52:19 215896
-+@@ -329,8 +329,16 @@
-+
-+ /* Variables declared 'const' without an initializer
-+ have zero as the initializer if they may not be
-+- overridden at link or run time. */
-+- if (!DECL_INITIAL (real_decl)
-++ overridden at link or run time.
-++
-++ It is actually requirement for C++ compiler to optimize const variables
-++ consistently. As a GNU extension, do not enfore this rule for user defined
-++ weak variables, so we support interposition on:
-++ static const int dummy = 0;
-++ extern const int foo __attribute__((__weak__, __alias__("dummy")));
-++ */
-++ if ((!DECL_INITIAL (real_decl)
-++ || (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
-+ && (DECL_EXTERNAL (decl) || decl_replaceable_p (decl)))
-+ return error_mark_node;
-+
-
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
new file mode 100644
index 0000000000..f29559698a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
@@ -0,0 +1,32 @@
+Disable the MULTILIB_OSDIRNAMES and other multilib options.
+
+Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
+systems where the libdir is NOT set to /lib64. This is allowed by the ABI, as
+long as the dynamic loader is present in /lib.
+
+We simply want to use the default rules in gcc to find and configure the
+normal libdir.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+===================================================================
+--- gcc-4.9.1.orig/gcc/config/aarch64/t-aarch64-linux
++++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
+@@ -21,11 +21,11 @@
+ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ # Disable the multilib for linux-gnu targets for the time being; focus
+ # on the baremetal targets.
+-MULTILIB_OPTIONS =
+-MULTILIB_DIRNAMES =
++#MULTILIB_OPTIONS =
++#MULTILIB_DIRNAMES =
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
index 8a205b750b..4b312d4fa9 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
@@ -5,8 +5,8 @@ Subject: [PATCH] r212171
* except.c (emit_note_eh_region_end): New helper
function. (convert_to_eh_region_ranges): Use
- emit_note_eh_region_end to emit EH_REGION_END note.
- * jump.c (cleanup_barriers): Do not split a call and its
+ emit_note_eh_region_end to emit EH_REGION_END note.
+ * jump.c (cleanup_barriers): Do not split a call and its
corresponding CALL_ARG_LOCATION note.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212171 138bc75d-0d04-0410-961f-82ee72b054a4
@@ -25,7 +25,7 @@ index dc5c1d2..7ac114f 100644
@@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section)
return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1;
}
-
+
+static rtx
+emit_note_eh_region_end (rtx insn)
+{
@@ -44,35 +44,35 @@ index dc5c1d2..7ac114f 100644
The new note numbers will not refer to region numbers, but
instead to call site entries. */
@@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void)
- note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
- first_no_action_insn_before_switch);
- NOTE_EH_HANDLER (note) = call_site;
+ note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
+ first_no_action_insn_before_switch);
+ NOTE_EH_HANDLER (note) = call_site;
- note = emit_note_after (NOTE_INSN_EH_REGION_END,
- last_no_action_insn_before_switch);
+ note
+ = emit_note_eh_region_end (last_no_action_insn_before_switch);
- NOTE_EH_HANDLER (note) = call_site;
- gcc_assert (last_action != -3
- || (last_action_insn
+ NOTE_EH_HANDLER (note) = call_site;
+ gcc_assert (last_action != -3
+ || (last_action_insn
@@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void)
- first_no_action_insn = NULL_RTX;
- }
-
+ first_no_action_insn = NULL_RTX;
+ }
+
- note = emit_note_after (NOTE_INSN_EH_REGION_END,
- last_action_insn);
+ note = emit_note_eh_region_end (last_action_insn);
- NOTE_EH_HANDLER (note) = call_site;
- }
-
+ NOTE_EH_HANDLER (note) = call_site;
+ }
+
@@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void)
-
+
if (last_action >= -1 && ! first_no_action_insn)
{
- note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn);
+ note = emit_note_eh_region_end (last_action_insn);
NOTE_EH_HANDLER (note) = call_site;
}
-
+
diff --git a/gcc/jump.c b/gcc/jump.c
index 9418f65..a5e5f52 100644
--- a/gcc/jump.c
@@ -88,11 +88,11 @@ index 9418f65..a5e5f52 100644
{
- next = NEXT_INSN (insn);
if (BARRIER_P (insn))
- {
+ {
- prev = prev_nonnote_insn (insn);
+ rtx prev = prev_nonnote_insn (insn);
- if (!prev)
- continue;
+ if (!prev)
+ continue;
+
+ if (CALL_P (prev))
+ {
@@ -105,8 +105,9 @@ index 9418f65..a5e5f52 100644
+ prev = next;
+ }
+
- if (BARRIER_P (prev))
- delete_insn (insn);
- else if (prev != PREV_INSN (insn))
---
+ if (BARRIER_P (prev))
+ delete_insn (insn);
+ else if (prev != PREV_INSN (insn))
+--
1.7.9.5
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
index 77f6be33d1..6d24aa4572 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
@@ -2,7 +2,7 @@ From 6eae3e637fcc22d21b51d44d61e3a9cb4825e776 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Thu, 30 Oct 2014 20:37:14 -0700
Subject: [PATCH]PR rtl-optimization/63348
-
+
PR rtl-optimization/63348
* emit-rtl.c (try_split): Do not emit extra barrier.
@@ -31,9 +31,9 @@ index 4736f8d..ae69dbd 100644
int probability;
rtx insn_last, insn;
@@ -3441,14 +3440,6 @@ try_split (rtx pat, rtx trial, int last)
-
+
split_branch_probability = -1;
-
+
- /* If we are splitting a JUMP_INSN, it might be followed by a BARRIER.
- We may need to handle this specially. */
- if (after && BARRIER_P (after))
@@ -44,15 +44,16 @@ index 4736f8d..ae69dbd 100644
-
if (!seq)
return trial;
-
+
@@ -3594,8 +3585,6 @@ try_split (rtx pat, rtx trial, int last)
tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
-
+
delete_insn (trial);
- if (has_barrier)
- emit_barrier_after (tem);
-
+
/* Recursively call try_split for each new insn created; by the
time control returns here that insn will be fully split, so
---
+--
1.7.1
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch b/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch
new file mode 100644
index 0000000000..75a9fdd441
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch
@@ -0,0 +1,55 @@
+From 5c0092070253113cf0d9c45eacc884b3ecc34d81 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 25 Oct 2014 00:23:17 +0000
+Subject: [PATCH] Only allow e500 double in SPE_SIMD_REGNO_P registers.
+
+rs6000_hard_regno_nregs_internal allows SPE vectors in single
+registers satisfying SPE_SIMD_REGNO_P (i.e. register numbers 0 to
+31). However, the corresponding test for e500 double treats all
+registers as being able to store a 64-bit value, rather than just
+those GPRs.
+
+Logically this inconsistency is wrong; in addition, it causes problems
+unwinding from signal handlers. linux-unwind.h uses
+ARG_POINTER_REGNUM as a place to store the return address from a
+signal handler, but this logic in rs6000_hard_regno_nregs_internal
+results in that being considered an 8-byte register, resulting in
+assertion failures.
+(<https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html> first
+needs to be applied for unwinding to work in general on e500.) This
+patch makes rs6000_hard_regno_nregs_internal handle the e500 double
+case consistently with SPE vectors.
+
+Tested with no regressions with cross to powerpc-linux-gnuspe (given
+the aforementioned patch applied). Failures of signal handling
+unwinding tests such as gcc.dg/cleanup-{8,9,10,11}.c are fixed by this
+patch.
+
+ * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Do
+ not allow e500 double in registers not satisyfing
+ SPE_SIMD_REGNO_P.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216688 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [gcc 5.0]
+
+---
+ gcc/ChangeLog | 6 ++++++
+ gcc/config/rs6000/rs6000.c | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+Index: gcc-4.9.2/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/rs6000/rs6000.c
++++ gcc-4.9.2/gcc/config/rs6000/rs6000.c
+@@ -1703,7 +1703,7 @@ rs6000_hard_regno_nregs_internal (int re
+ SCmode so as to pass the value correctly in a pair of
+ registers. */
+ else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
+- && !DECIMAL_FLOAT_MODE_P (mode))
++ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
+ reg_size = UNITS_PER_FP_WORD;
+
+ else
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch b/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch
index f48c66dcac..f48c66dcac 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/target-gcc-includedir.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 0693118992..6c60cf97f6 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -52,7 +52,6 @@ EXTRA_OECONF = "\
${@get_gcc_multiarch_setting(bb, d)} \
"
-export ac_cv_path_SED = 'sed'
export gcc_cv_collect2_libs = 'none required'
# We need to set gcc_cv_collect2_libs else there is cross-compilation badness
# in the config.log files (which might not get generated until do_compile
@@ -64,6 +63,8 @@ EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit"
EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
# ARMv6+ adds atomic instructions that affect the ABI in libraries built
# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index ba001a9118..750a4f2113 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -10,9 +10,9 @@ GCCMULTILIB = "--enable-multilib"
require gcc-configure-common.inc
EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++/${BINV} \
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
--with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
- --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${STAGING_DIR_TARGET} \
"
# We have to point gcc at a sysroot but we don't need to rebuild if this changes
@@ -62,12 +62,10 @@ do_compile () {
oe_runmake all-host configure-target-libgcc
}
-INHIBIT_PACKAGE_STRIP = "1"
-
# Having anything auto depending on gcc-cross-sdk is a really bad idea...
EXCLUDE_FROM_SHLIBS = "1"
-PACKAGES = "${PN} ${PN}-doc"
+PACKAGES = "${PN}-dbg ${PN} ${PN}-doc"
FILES_${PN} = "\
${exec_prefix}/bin/* \
@@ -86,6 +84,11 @@ FILES_${PN} = "\
"
INSANE_SKIP_${PN} += "dev-so"
+FILES_${PN}-dbg += " \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug \
+ ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug \
+"
+
FILES_${PN}-doc = "\
${infodir} \
${mandir} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 6e2f25b562..7197447080 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -21,7 +21,7 @@ EXTRA_OECONF = "\
--enable-languages=c \
${OPTSPACE} \
--program-prefix=${TARGET_PREFIX} \
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
${EXTRA_OECONF_INITIAL} \
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 4cae160e78..97929501e8 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -25,8 +25,8 @@ EXTRA_OECONF += "\
"
EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${STAGING_DIR_TARGET} \
"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 167869e1f2..09757e6ccc 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -4,7 +4,7 @@ CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
EXTRA_OECONF_PATHS = "\
--with-gxx-include-dir=${includedir}/c++/${BINV} \
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${STAGING_DIR_TARGET} \
"
@@ -76,9 +76,6 @@ PACKAGES = "\
libssp \
libssp-dev \
libssp-staticdev \
- libgfortran \
- libgfortran-dev \
- libgfortran-staticdev \
libmudflap \
libmudflap-dev \
libmudflap-staticdev \
@@ -92,6 +89,37 @@ PACKAGES = "\
libatomic-dev \
libatomic-staticdev \
"
+
+# Most libraries are licensed with the exception, but
+# one library is really GPLv3.
+#
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception & GPLv3"
+LICENSE_libstdc++ = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-precompile-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libstdc++-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c = "GPL-3.0-with-GCC-exception"
+LICENSE_libg2c-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libssp-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libgfortran-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libmudflap-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libquadmath-staticdev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_libatomic-staticdev = "GPL-3.0-with-GCC-exception"
+
+LICENSE_libgomp = "GPLv3"
+LICENSE_libgomp-dev = "GPLv3"
+LICENSE_libgomp-staticdev = "GPLv3"
+
# The base package doesn't exist, so we clear the recommends.
RRECOMMENDS_${PN}-dbg = ""
@@ -131,18 +159,6 @@ FILES_libssp-dev = "\
"
FILES_libssp-staticdev = "${libdir}/libssp*.a"
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = "\
- ${libdir}/libgfortran*.so \
- ${libdir}/libgfortran.spec \
- ${libdir}/libgfortran.la \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
- ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
-"
-FILES_libgfortran-staticdev = "${libdir}/libgfortran.a"
-
-INSANE_SKIP_${MLPREFIX}libgfortran-dev = "staticdev"
-
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
FILES_libquadmath-dev = "\
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
new file mode 100644
index 0000000000..c987ccb589
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -0,0 +1,119 @@
+require gcc-configure-common.inc
+
+LICENSE = "NCSA | MIT"
+
+LIC_FILES_CHKSUM = "\
+ file://libsanitizer/LICENSE.TXT;md5=0249c37748936faf5b1efd5789587909 \
+"
+
+EXTRA_OECONF_PATHS = "\
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
+
+do_configure () {
+ mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ if [ -d ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ]; then
+ hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
+ fi
+
+ echo "Configuring libsanitizer"
+ rm -rf ${B}/$target/libsanitizer/
+ mkdir -p ${B}/$target/libsanitizer/
+ # This is kind of gross, but it's an easy way to make configure happy
+ # without hacking it up to use the system stdc++ instead of the one it
+ # expects to be newly built.
+ rm -rf ${B}/$target/libstdc++-v3/
+ mkdir -p ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.la ${B}/$target/libstdc++-v3/src/
+ ln -s ${STAGING_LIBDIR}/libstdc++.so ${B}/$target/libstdc++-v3/src/
+ cd ${B}/$target/libsanitizer/
+ chmod a+x ${S}/libsanitizer/configure
+ ${S}/libsanitizer/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool
+}
+
+do_compile () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/
+}
+
+do_install () {
+ target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+ cd ${B}/$target/libsanitizer/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install
+ if [ -d ${D}${infodir} ]; then
+ rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+ fi
+ chown -R root:root ${D}
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+ALLOW_EMPTY_${PN} = "1"
+DEPENDS = "gcc-runtime"
+
+BBCLASSEXTEND = "nativesdk"
+
+PACKAGES = "${PN}"
+PACKAGES += "libasan libubsan liblsan libtsan"
+PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
+PACKAGES += "libasan-dbg libubsan-dbg liblsan-dbg libtsan-dbg"
+PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
+
+RDEPENDS_libasan += "libstdc++"
+RDEPENDS_libubsan += "libstdc++"
+RDEPENDS_liblsan += "libstdc++"
+RDEPENDS_libtsan += "libstdc++"
+RDEPENDS_libasan-dev += "${PN}"
+RDEPENDS_libubsan-dev += "${PN}"
+RDEPENDS_liblsan-dev += "${PN}"
+RDEPENDS_libtsan-dev += "${PN}"
+RRECOMMENDS_${PN} += "libasan libubsan"
+RRECOMMENDS_${PN}_append_x86-64 = " liblsan libtsan"
+RRECOMMENDS_${PN}_append_x86 = " liblsan"
+
+do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata"
+
+# MIPS, aarch64, and SPARC are broken.
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
+
+FILES_libasan += "${libdir}/libasan.so.*"
+FILES_libasan-dbg += "${libdir}/.debug/libasan.so.*"
+FILES_libasan-dev += "\
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/libasan.la \
+"
+FILES_libasan-staticdev += "${libdir}/libasan.a"
+
+FILES_libubsan += "${libdir}/libubsan.so.*"
+FILES_libubsan-dbg += "${libdir}/.debug/libubsan.so.*"
+FILES_libubsan-dev += "\
+ ${libdir}/libubsan.so \
+ ${libdir}/libubsan.la \
+"
+FILES_libubsan-staticdev += "${libdir}/libubsan.a"
+
+FILES_liblsan += "${libdir}/liblsan.so.*"
+FILES_liblsan-dbg += "${libdir}/.debug/liblsan.so.*"
+FILES_liblsan-dev += "\
+ ${libdir}/liblsan.so \
+ ${libdir}/liblsan.la \
+"
+FILES_liblsan-staticdev += "${libdir}/liblsan.a"
+
+FILES_libtsan += "${libdir}/libtsan.so.*"
+FILES_libtsan-dbg += "${libdir}/.debug/libtsan.so.*"
+FILES_libtsan-dev += "\
+ ${libdir}/libtsan.so \
+ ${libdir}/libtsan.la \
+"
+FILES_libtsan-staticdev += "${libdir}/libtsan.a"
+
+FILES_${PN} = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
new file mode 100644
index 0000000000..601f666023
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
@@ -0,0 +1,2 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-sanitizers.inc
diff --git a/meta/recipes-devtools/gcc/gcc-source.inc b/meta/recipes-devtools/gcc/gcc-source.inc
index 950471cc32..10e9285c44 100644
--- a/meta/recipes-devtools/gcc/gcc-source.inc
+++ b/meta/recipes-devtools/gcc/gcc-source.inc
@@ -1,12 +1,12 @@
-deltask do_configure
-deltask do_compile
-deltask do_package
-deltask do_package_write_rpm
-deltask do_package_write_ipk
+deltask do_configure
+deltask do_compile
+deltask do_package
+deltask do_package_write_rpm
+deltask do_package_write_ipk
deltask do_package_write_deb
-deltask do_install
+deltask do_install
deltask do_populate_sysroot
-deltask do_populate_lic
+deltask do_populate_lic
deltask do_package_qa
deltask do_packagedata
deltask do_rm_work
@@ -19,6 +19,7 @@ STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-[0-9]*-*"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = ""
+PACKAGES = ""
python do_preconfigure () {
import subprocess
@@ -31,3 +32,4 @@ python do_preconfigure () {
}
addtask do_preconfigure after do_patch
do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
+
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index a266f16edf..4c3eea6851 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -166,3 +166,12 @@ do_install () {
chown -R root:root ${D}
}
+
+# Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross
+# and one from here. These can confuse gcc cross where includes use #include_next
+# and builds track file dependencies (e.g. perl and its makedepends code).
+# For determinism we don't install this ever and rely on the copy from gcc-cross.
+# [YOCTO #7287]
+sysroot_stage_dirs_append () {
+ rm -rf $to${libdir}/gcc
+}
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 22c42d5eca..21cb8c1084 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -9,6 +9,13 @@ PACKAGES = "\
libgcov-dev \
"
+# All libgcc source is marked with the exception.
+#
+LICENSE_${PN} = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dev = "GPL-3.0-with-GCC-exception"
+LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception"
+
+
FILES_${PN} = "${base_libdir}/libgcc*.so.*"
FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc
index cf7942f41d..e42843d2f1 100644
--- a/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/meta/recipes-devtools/gcc/libgfortran.inc
@@ -1,7 +1,7 @@
require gcc-configure-common.inc
EXTRA_OECONF_PATHS = "\
- --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-sysroot=/not/exist \
--with-build-sysroot=${STAGING_DIR_TARGET} \
"
diff --git a/meta/recipes-devtools/gdb/gdb-7.7.1.inc b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
index aa16d5a09f..510ea18945 100644
--- a/meta/recipes-devtools/gdb/gdb-7.7.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.8.1.inc
@@ -4,7 +4,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-S = "${WORKDIR}/${BPN}-${PV}"
+SRC_URI[md5sum] = "997492cc3475c96f35ecc8775248c9b1"
+SRC_URI[sha256sum] = "d7a923d876ecfa1cec4c1c79c014c9d8e58783a25855a95cf260275f61990647"
-SRC_URI[md5sum] = "45b07b53d81832d32ccd4829465d4886"
-SRC_URI[sha256sum] = "eefadb9831e3695d1eaef34e98b8f1fb441df6fe5071317ea49c6bd6ba213eff"
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index 599b405e03..81af42f323 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -11,6 +11,8 @@ LTTNGUST_mips = ""
LTTNGUST_mipsel = ""
LTTNGUST_mips64 = ""
LTTNGUST_mips64el = ""
+LTTNGUST_mips64n32 = ""
+LTTNGUST_mips64eln32 = ""
LTTNGUST_sh4 = ""
INC_PR = "r0"
@@ -38,7 +40,7 @@ EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
--with-curses --disable-multilib --with-system-readline --disable-sim \
- --without-lzma \
+ --without-lzma --without-guile \
${GDBPROPREFIX} ${EXPAT} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
--disable-rpath \
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 844dce9451..4fd60a615e 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -11,7 +11,7 @@ RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
-EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
+EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
index 301035940c..301035940c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.7.1.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.7.1.bb b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
index f9da486d7d..f9da486d7d 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.7.1.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.8.1.bb
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 7b3e59af62..2c95e03b1b 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -2,10 +2,8 @@ require gdb-common.inc
inherit gettext
-SRC_URI += "file://kill_arm_map_symbols.patch \
- file://gdbserver-cflags-last.diff;striplevel=0 \
+SRC_URI += "file://gdbserver-cflags-last.diff;striplevel=0 \
file://renesas-sh-native-support.patch \
- file://include_asm_ptrace.patch \
"
#LDFLAGS_append = " -s"
#export CFLAGS_append=" -L${STAGING_LIBDIR}"
diff --git a/meta/recipes-devtools/gdb/gdb/include_asm_ptrace.patch b/meta/recipes-devtools/gdb/gdb/include_asm_ptrace.patch
deleted file mode 100644
index 85e0147665..0000000000
--- a/meta/recipes-devtools/gdb/gdb/include_asm_ptrace.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-gdb: include asm/ptrace.h in two aarch64 source files
-
-Both sys/ptrace.h and asm/ptrace.h need to be included.
-
-Upstream-Status: Pending
-
-Signed-off-by: joe.slater@windriver.com
-
-
---- a/gdb/aarch64-linux-nat.c
-+++ b/gdb/aarch64-linux-nat.c
-@@ -32,6 +32,8 @@
- #include "elf/common.h"
-
- #include <sys/ptrace.h>
-+#include <asm/ptrace.h>
-+
- #include <sys/utsname.h>
-
- #include "gregset.h"
---- a/gdb/gdbserver/linux-aarch64-low.c
-+++ b/gdb/gdbserver/linux-aarch64-low.c
-@@ -26,6 +26,7 @@
- #include <signal.h>
- #include <sys/user.h>
- #include <sys/ptrace.h>
-+#include <asm/ptrace.h>
- #include <sys/uio.h>
-
- #include "gdb_proc_service.h"
diff --git a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch b/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
deleted file mode 100644
index 9fc45b9f2a..0000000000
--- a/meta/recipes-devtools/gdb/gdb/kill_arm_map_symbols.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: gdb-7.3/gdb/arm-tdep.c
-===================================================================
---- gdb-7.3.orig/gdb/arm-tdep.c 2011-05-17 14:27:01.000000000 -0700
-+++ gdb-7.3/gdb/arm-tdep.c 2011-08-05 22:29:58.784201850 -0700
-@@ -7806,6 +7806,19 @@
- static void
- arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
- {
-+
-+ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
-+ displaying disassembly so we use this horrible hack here to
-+ artifically set their address to the highest possible value.
-+ This is wrong of course, and it prevents the symbols from being
-+ used for their intended purpose - to distinguish between ARM
-+ and THUMB code. So we ought to find a better way to do this. */
-+ if (bfd_asymbol_name (sym)
-+ && bfd_asymbol_name (sym)[0] == '$'
-+ && bfd_asymbol_name (sym)[1] != 0
-+ && bfd_asymbol_name (sym)[2] == 0)
-+ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
-+
- if (ARM_SYM_BRANCH_TYPE (&((elf_symbol_type *)sym)->internal_elf_sym)
- == ST_BRANCH_TO_THUMB)
- MSYMBOL_SET_SPECIAL (msym);
diff --git a/meta/recipes-devtools/gdb/gdb_7.7.1.bb b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
index 1abc9d8e76..1abc9d8e76 100644
--- a/meta/recipes-devtools/gdb/gdb_7.7.1.bb
+++ b/meta/recipes-devtools/gdb/gdb_7.8.1.bb
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index 5396628790..4da4a2754f 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -1,11 +1,14 @@
SUMMARY = "Distributed version control system"
+HOMEPAGE = "http://git-scm.com"
SECTION = "console/utils"
LICENSE = "GPLv2"
DEPENDS = "openssl curl zlib expat"
PROVIDES_append_class-native = " git-replacement-native"
-SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz"
+SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
+ ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
+
S = "${WORKDIR}/git-${PV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
@@ -30,6 +33,14 @@ do_install () {
oe_runmake install DESTDIR="${D}" bindir=${bindir} \
template_dir=${datadir}/git-core/templates \
GIT_PYTHON_DIR=${D}${datadir}/git-core/python
+ install -d ${D}/${mandir}/man1
+ install -d ${D}/${mandir}/man5
+ install -d ${D}/${mandir}/man7
+ install -t ${D}/${mandir}/man1 ${WORKDIR}/man1/*
+ install -t ${D}/${mandir}/man5 ${WORKDIR}/man5/*
+ install -t ${D}/${mandir}/man7 ${WORKDIR}/man7/*
+ install -d ${D}/${datadir}/bash-completion/completions/
+ install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
}
perl_native_fixup () {
@@ -86,6 +97,10 @@ PERLTOOLS = " \
${datadir}/git-core/templates/hooks/pre-rebase.sample \
"
+# Basic tab completion support
+PACKAGES =+ "${PN}-bash-completion"
+FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions/*"
+
# Git tools requiring perl
PACKAGES =+ "${PN}-perltools"
FILES_${PN}-perltools += " \
diff --git a/meta/recipes-devtools/git/git_2.0.1.bb b/meta/recipes-devtools/git/git_2.0.1.bb
deleted file mode 100644
index dbf32e1a03..0000000000
--- a/meta/recipes-devtools/git/git_2.0.1.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require git.inc
-
-SRC_URI[md5sum] = "981f5937840716cb563be1cc6292c8d7"
-SRC_URI[sha256sum] = "02609a06fb40db1f6a968867c0e82bcb959b85902747830de0fda53228712daf"
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes \
- ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
- "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
diff --git a/meta/recipes-devtools/git/git_2.3.0.bb b/meta/recipes-devtools/git/git_2.3.0.bb
new file mode 100644
index 0000000000..1611f6421b
--- /dev/null
+++ b/meta/recipes-devtools/git/git_2.3.0.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+SRC_URI[tarball.md5sum] = "edf994cf34cd3354dadcdfa6b4292335"
+SRC_URI[tarball.sha256sum] = "ba2fe814e709a5d0f034ebe82083fce7feed0899b3a8c8b3adf1c5a85d1ce9ac"
+SRC_URI[manpages.md5sum] = "620797eb73b281d0706979ae8038bbd7"
+SRC_URI[manpages.sha256sum] = "8aa4d1e5d7bbf5641a9de92279369d9b20cc266ba7b2888104efa40e80b53559"
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes \
+ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+ "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
index d67466ae79..f5fce6f020 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
@@ -17,6 +17,8 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/gnu-config/gnu-config-${PV
SRC_URI[md5sum] = "bcfca5a2bb39edad4aae5a65efc84094"
SRC_URI[sha256sum] = "44f99a8e76f3e8e4fec0bb5ad4762f8e44366168554ce66cb85afbe2ed3efd8b"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 00fa759176..754a99a4b0 100644
--- a/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -17,6 +17,8 @@ SRC_URI = "git://git.sv.gnu.org/config.git \
S = "${WORKDIR}/git"
+CLEANBROKEN = "1"
+
do_compile() {
:
}
diff --git a/meta/recipes-devtools/guile/files/arm_aarch64.patch b/meta/recipes-devtools/guile/files/arm_aarch64.patch
new file mode 100644
index 0000000000..f1788b62fb
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/arm_aarch64.patch
@@ -0,0 +1,19 @@
+guile: add aarch64 recognition
+
+Assume little-endian.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+--- a/module/system/base/target.scm
++++ b/module/system/base/target.scm
+@@ -70,6 +70,8 @@
+ ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
+ "mips" "mips64"))
+ (endianness big))
++ ((string-match "^aarch64" cpu)
++ (endianness little))
+ ((string-match "^arm.*eb" cpu)
+ (endianness big))
+ ((string-match "^arm.*" cpu)
diff --git a/meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
index 1045cbe21c..290b9d447d 100644
--- a/meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch
+++ b/meta/recipes-devtools/guile/files/libguile-Makefile.am-hook.patch
@@ -1,8 +1,7 @@
From 9c4e120a7a87db34d22a50883a5a525170b480d7 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Tue, 6 Jan 2015 23:10:51 -0800
-Subject: [PATCH] libguile/Makefile.am: install-data-hook: depends on
- install-libLTLIBRARIES
+Subject: [PATCH] libguile/Makefile.am: install-data-hook -> install-exec-hook
It may install such a file:
/usr/lib64/libguile-2.0*-gdb.scm
@@ -12,25 +11,29 @@ for f in libguile-2.0*; do
[snip]
done
-The f would be libguile-2.0* itself.
+The f would be libguile-2.0* itself, use install-exec-hook will fix the
+problem since it depends on install-libLTLIBRARIES.
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- libguile/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ libguile/Makefile.am | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
-index 281faac..fe0a3ba 100644
+index 5decd99..52645b7 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
-@@ -449,7 +449,7 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
- install-exec-hook:
+@@ -446,10 +446,8 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
+ ## delete guile-snarf.awk from the installation bindir, in case it's
+ ## lingering there due to an earlier guile version not having been
+ ## wiped out.
+-install-exec-hook:
++install-exec-hook: libguile-2.0-gdb.scm
rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
-
+-
-install-data-hook: libguile-2.0-gdb.scm
-+install-data-hook: libguile-2.0-gdb.scm install-libLTLIBRARIES
@$(MKDIR_P) $(DESTDIR)$(libdir)
## We want to install libguile-2.0-gdb.scm as SOMETHING-gdb.scm.
## SOMETHING is the full name of the final library. We want to ignore
diff --git a/meta/recipes-devtools/guile/guile_2.0.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
index 8fda850fc2..d1578e08cf 100644
--- a/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -19,8 +19,9 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
file://opensuse/guile-64bit.patch \
file://guile_2.0.6_fix_sed_error.patch \
file://arm_endianness.patch \
+ file://arm_aarch64.patch \
file://workaround-ice-ssa-corruption.patch \
- file://libguile-Makefile.am-depends.patch \
+ file://libguile-Makefile.am-hook.patch \
"
# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
diff --git a/meta/recipes-devtools/help2man/help2man-native_1.46.1.bb b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
index a51c81f99c..5b90da9afa 100644
--- a/meta/recipes-devtools/help2man/help2man-native_1.46.1.bb
+++ b/meta/recipes-devtools/help2man/help2man-native_1.46.4.bb
@@ -6,8 +6,8 @@ DEPENDS = "autoconf-native automake-native"
SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "63b8f14a81ce28ba119d588d00c63f43"
-SRC_URI[sha256sum] = "3dfd02a026149aad06887c1cb6062471779c100e00aecb79b8f9d01cf1581c47"
+SRC_URI[md5sum] = "a1b7fe49eddae8a2537ed74ee9ef11cb"
+SRC_URI[sha256sum] = "1ae7f15f53b0cc55b070ae49df2ee5caa942c71529054e157599427bba3c5633"
inherit autotools native
diff --git a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
index 18e7fc0062..6b356b0d44 100644
--- a/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
+++ b/meta/recipes-devtools/icon-naming-utils/icon-naming-utils_0.8.90.bb
@@ -10,7 +10,7 @@ and names that can be used to make icon themes work in a desktop \
environment or application that implements the naming specification. "
LICENSE = "GPLv2"
DEPENDS = "libxml-simple-perl-native"
-PR = "r4"
+PR = "r5"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
@@ -18,7 +18,7 @@ SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-${PV}.tar.gz"
SRC_URI[md5sum] = "2c5c7a418e5eb3268f65e21993277fba"
SRC_URI[sha256sum] = "044ab2199ed8c6a55ce36fd4fcd8b8021a5e21f5bab028c0a7cdcf52a5902e1c"
-inherit autotools-brokensep allarch perlnative
+inherit autotools allarch perlnative
do_configure_append() {
# Make sure we use our nativeperl wrapper.
diff --git a/meta/recipes-devtools/json-c/json-c_0.11.bb b/meta/recipes-devtools/json-c/json-c_0.12.bb
index 389e0f9ebf..e9c5b31745 100644
--- a/meta/recipes-devtools/json-c/json-c_0.11.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -6,16 +6,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
-SRC_URI[md5sum] = "aa02367d2f7a830bf1e3376f77881e98"
-SRC_URI[sha256sum] = "28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c"
+SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
+SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
RPROVIDES_${PN} = "libjson"
-PARALLEL_MAKE = ""
-
inherit autotools
do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
rm -f ${S}/config.status
}
+
+CFLAGS += "-Wno-error=unused-but-set-variable"
diff --git a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
index ef0019fc7d..48a2f935be 100644
--- a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
@@ -18,8 +18,6 @@ SRC_URI = "http://ymorin.is-a-geek.org/download/${BPN}/${BP}.tar.xz"
SRC_URI[md5sum] = "b939280dcc83f8feabd87a1d5f9b00c2"
SRC_URI[sha256sum] = "ea2615a62c74bea6ce3b38402f00c7513858f307f6ba7aa9fdbf0bbc12bcf407"
-S = "${WORKDIR}/${BPN}-${PV}"
-
inherit autotools
do_configure_prepend () {
mkdir -p scripts/.autostuff/m4
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index 0f1964b57b..2125de32f9 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.2.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -5,31 +5,29 @@ Libtool hides the complexity of generating special library types \
HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
SECTION = "devel"
LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-INC_PR = "r6"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://libltdl/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c "
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
file://trailingslash.patch \
file://rename-with-sysroot.patch \
file://use-sysroot-in-libpath.patch \
file://fix-final-rpath.patch \
- file://avoid_absolute_paths_for_general_utils.patch \
file://fix-rpath.patch \
- file://respect-fstack-protector.patch \
file://norm-rpath.patch \
file://dont-depend-on-help2man.patch \
file://fix-resolve-lt-sysroot.patch \
+ file://nohardcodepaths.patch \
+ file://unwind-opt-parsing.patch \
"
-SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50"
-SRC_URI[sha256sum] = "b38de44862a987293cd3d8dfae1c409d514b6c4e794ebc93648febf9afc38918"
+SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
+SRC_URI[sha256sum] = "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3"
do_compile_prepend () {
# Sometimes this file doesn't get rebuilt, force the issue
- rm -f ${S}/libltdl/config/ltmain.sh
- make libltdl/config/ltmain.sh
+ rm -f ${S}/build-aux/ltmain.sh
+ make build-aux/ltmain.sh
./config.status
}
@@ -47,6 +45,7 @@ FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
#FILES_${PN}-dev := "${@oe_filter_out('${datadir}/aclocal', '${FILES_libtool-dev}', d)}"
FILES_libltdl = "${libdir}/libltdl${SOLIBS}"
FILES_libltdl-dev = "${libdir}/libltdl${SOLIBSDEV} ${includedir}"
+FILES_libltdl-dev =+ "${libdir}/libltdl.la"
FILES_libltdl-staticdev = "${libdir}/libltdl.a"
FILES_libltdl-dbg = "${libdir}/.debug/"
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 34aae0bf13..847880270d 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -1,6 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.1"
PACKAGES = ""
SRC_URI += "file://prefix.patch"
SRC_URI += "file://fixinstall.patch"
@@ -18,17 +17,18 @@ do_install () {
install -d ${D}${bindir_crossscripts}/
install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
install -d ${D}${bindir_crossscripts}/
- install -m 0755 libtoolize ${D}${bindir_crossscripts}/
- install -d ${D}${target_datadir}/libtool/config/
+ GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
+ chmod 0755 ${D}${bindir_crossscripts}/libtoolize
+ install -d ${D}${target_datadir}/libtool/build-aux/
install -d ${D}${target_datadir}/aclocal/
- install -c ${S}/libltdl/config/compile ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.guess ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/config.sub ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/depcomp ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/install-sh ${D}${target_datadir}/libtool/config/
- install -c ${S}/libltdl/config/missing ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${target_datadir}/libtool/config/
- install -c -m 0644 ${S}/libltdl/m4/*.m4 ${D}${target_datadir}/aclocal/
+ install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/
+ install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/
+ install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
}
SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
index f03859e061..4c5218ade0 100644
--- a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
@@ -2,7 +2,6 @@ require libtool-${PV}.inc
DEPENDS = ""
-PR = "${INC_PR}.1"
SRC_URI += "file://prefix.patch"
inherit native
diff --git a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch b/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
deleted file mode 100644
index 3c751ed0e2..0000000000
--- a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Pending
-
-On some distro the path of utils like sed, grep etc are different than the
-buildhost system.
- This was causing runtime issue while running libtoolize from the
-libtool-nativesdk package.
- This patch takes out the absolute paths of these utils, and put
-responsibility on the end-user to set correct paths for these utilities to be
-found out.
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/02/18
-
-
-Index: libtool-2.4.2/libltdl/config/general.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/general.m4sh
-+++ libtool-2.4.2/libltdl/config/general.m4sh
-@@ -45,15 +45,15 @@ progpath="$0"
- M4SH_VERBATIM([[
- : ${CP="cp -f"}
- test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
--: ${EGREP="@EGREP@"}
--: ${FGREP="@FGREP@"}
--: ${GREP="@GREP@"}
--: ${LN_S="@LN_S@"}
-+: ${EGREP="egrep"}
-+: ${FGREP="fgrep"}
-+: ${GREP="grep"}
-+: ${LN_S="ln -s"}
- : ${MAKE="make"}
- : ${MKDIR="mkdir"}
- : ${MV="mv -f"}
- : ${RM="rm -f"}
--: ${SED="@SED@"}
-+: ${SED="sed"}
- : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
- : ${Xsed="$SED -e 1s/^X//"}
-
diff --git a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
index 67552b0ff5..fd4084c859 100644
--- a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
+++ b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
@@ -1,24 +1,30 @@
Upstream-Status: Inappropriate
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libtool-2.4.2/Makefile.am libtool-2.4.2/Makefile.am
---- libtool-2.4.2/Makefile.am 2011-10-17 13:17:04.000000000 +0300
-+++ libtool-2.4.2/Makefile.am 2013-01-01 22:03:36.865586811 +0200
-@@ -327,17 +327,6 @@
- cd $(srcdir)/doc && \
- $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
+Updated by: Robert Yang <liezhi.yang@windriver.com>
--dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -404,21 +404,6 @@ $(notes_txt): $(notes_texi)
+ $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \
+ $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)'
+
+-dist_man1_MANS = $(libtool_1) $(libtoolize_1)
-MAINTAINERCLEANFILES += $(dist_man1_MANS)
-update_mans = \
- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
-- $(HELP2MAN) --output=$@
--$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
-- $(update_mans) --help-option=--help-all libtool
--$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
-- $(update_mans) libtoolize
+- $(HELP2MAN) --output='$@'
-
+-# It's wrong to make distributed files (e.g. $(libtool_1)) rely on
+-# files created in the build tree, so instead we regenerate the
+-# manual pages if the sources for the build-tree files we want to
+-# run have changed.
+-$(libtool_1): $(ltmain_sh)
+- $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool
+-$(libtoolize_1): $(libtoolize_in)
+- $(AM_V_GEN)$(update_mans) libtoolize
-
+
## ------------- ##
## Installation. ##
- ## ------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
index 5c275ffd32..5c9f8cc9c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
@@ -6,13 +6,14 @@ This works around the issue until it gets sorted out upstream.
Fix suggested by Richard Purdie <richard.purdie@intel.com>
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -7268,9 +7268,11 @@ EOF
- test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -7569,9 +7569,11 @@ EOF
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ func_replace_sysroot "$libdir"
@@ -23,9 +24,9 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
- func_replace_sysroot "$libdir"
- libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
else
-@@ -7999,6 +8001,10 @@ EOF
+@@ -8301,6 +8303,10 @@ EOF
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
@@ -35,4 +36,15 @@ Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+ libdir=$func_stripname_result
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs="$libdir"
+ hardcode_libdirs=$libdir
+@@ -8352,6 +8358,10 @@ EOF
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
++ func_replace_sysroot "$libdir"
++ libdir=$func_replace_sysroot_result
++ func_stripname '=' '' "$libdir"
++ libdir=$func_stripname_result
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
index 44e9fe17ae..1bd95980c0 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
@@ -10,17 +10,18 @@ I have also reported the problem to libtool here
http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html
Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
---
-diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2013-09-13 22:37:43.647282945 +0200
-+++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-09-14 10:27:37.168178605 +0200
-@@ -1234,16 +1234,21 @@
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
- case ${with_libtool_sysroot} in #(
+ case $with_libtool_sysroot in #(
- yes)
+ no)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Treat "/" the same a an unset sysroot. It seems to be more
+ # compatible across host platforms that way!?
@@ -37,5 +38,5 @@ diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libto
- no|'')
- ;; #(
*)
- AC_MSG_RESULT([${with_libtool_sysroot}])
+ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
index 1571178a6a..a2ec9473e7 100644
--- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
@@ -6,10 +6,12 @@ RP 23/9/2011
Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+Index: libtool-2.4.2/build-aux/ltmain.in
===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
+--- libtool-2.4.2.orig/build-aux/ltmain.in
++++ libtool-2.4.2/build-aux/ltmain.in
@@ -7286,8 +7286,14 @@ EOF
esac
fi
diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
index 279c07be37..8f343bf436 100644
--- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch
+++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
@@ -16,12 +16,13 @@ Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this]
RP 2011/11/16
-Index: libtool-2.4/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2011-11-16 14:50:01.070383779 +0000
-+++ libtool-2.4/libltdl/config/ltmain.m4sh 2011-11-16 15:27:13.582310413 +0000
-@@ -2163,7 +2163,7 @@
- dir="$func_dirname_result"
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2355,7 +2355,7 @@ func_mode_install ()
+ dir=$func_dirname_result
func_append dir "$objdir"
- if test -n "$relink_command"; then
@@ -29,16 +30,16 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
# Strip any trailing slash from the destination.
func_stripname '' '/' "$libdir"
destlibdir=$func_stripname_result
-@@ -2202,7 +2202,7 @@
+@@ -2394,7 +2394,7 @@ func_mode_install ()
shift
- srcname="$realname"
-- test -n "$relink_command" && srcname="$realname"T
+ srcname=$realname
+- test -n "$relink_command" && srcname=${realname}T
+ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
-@@ -5856,15 +5856,15 @@
+@@ -6162,15 +6162,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -63,7 +64,7 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -5930,15 +5930,15 @@
+@@ -6236,15 +6236,15 @@ func_mode_link ()
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -88,14 +89,14 @@ Index: libtool-2.4/libltdl/config/ltmain.m4sh
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
-@@ -6284,8 +6284,8 @@
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+@@ -6590,8 +6590,8 @@ func_mode_link ()
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
-- func_warning "\`$deplib' seems to be moved"
+- func_warning "'$deplib' seems to be moved"
+ #test "$absdir" != "$libdir" && \
-+ # func_warning "\`$deplib' seems to be moved"
++ # func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
new file mode 100644
index 0000000000..b2239fbade
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch
@@ -0,0 +1,27 @@
+If for example you build on a machine with /bin/grep, then restore that sstate
+onto a machine with /usr/bin/grep, things will fail. Simply don't bother
+hardcoding paths.
+
+RP 2015/2/3
+
+Index: libtool-2.4.5/libtoolize.in
+===================================================================
+--- libtool-2.4.5.orig/libtoolize.in
++++ libtool-2.4.5/libtoolize.in
+@@ -40,11 +40,11 @@
+
+ : ${AUTOCONF="autoconf"}
+ : ${AUTOMAKE="automake"}
+-: ${EGREP="@EGREP@"}
+-: ${FGREP="@FGREP@"}
+-: ${GREP="@GREP@"}
+-: ${LN_S="@LN_S@"}
+-: ${SED="@SED@"}
++: ${EGREP="egrep"}
++: ${FGREP="fgrep"}
++: ${GREP="grep"}
++: ${LN_S="ln -s"}
++: ${SED="sed"}
+
+
+ ## -------------------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
index dce1576c41..1e4c65e024 100644
--- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
@@ -7,9 +7,11 @@ RPATH in the generated binary. Normalize before comparision.
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Upstream-Status: Pending
-diff -ur a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
---- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700
-+++ b/libltdl/config/ltmain.m4sh 2012-08-22 11:01:34.191345989 -0700
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700
++++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700
@@ -7288,8 +7288,10 @@
else
# We only want to hardcode in an rpath if it isn't in the
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
index 5e46e68f03..a73df2e4a7 100644
--- a/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -18,35 +18,13 @@ the simplest fix is just to remove $SHELL.
Updated: Date: 2011/11/09
RP
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS="$ltmain"
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
-
- _LT_SETUP
-@@ -206,7 +207,7 @@ aix3*)
- esac
-
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
-
- # All known linkers require a `.a' archive for static linking (except MSVC,
-Index: libtool-2.4.2/Makefile.am
-===================================================================
---- libtool-2.4.2.orig/Makefile.am
-+++ libtool-2.4.2/Makefile.am
-@@ -31,7 +31,7 @@ AM_LDFLAGS =
- DIST_SUBDIRS = .
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -31,7 +31,7 @@ SUBDIRS = .
+ DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST =
-BUILT_SOURCES = libtool libtoolize
@@ -54,58 +32,67 @@ Index: libtool-2.4.2/Makefile.am
CLEANFILES =
MOSTLYCLEANFILES =
-@@ -72,7 +72,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
- ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
- ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
- ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
--CLEANFILES += libtool libtoolize libtoolize.tmp \
-+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
- $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
+@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
+
+ EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
+ GNUmakefile
+-CLEANFILES += libtool libtoolize
++CLEANFILES += $(host_alias)-libtool libtoolize
- ## These are the replacements that need to be made at bootstrap time,
-@@ -231,7 +231,7 @@ configure_edit = sed \
- -e 's,@SED\@,$(SED),g'
+ ## If a file is named several times below, and especially if it
+ ## is a distributed file created during Libtool bootstrap, we
+@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
+ -e 's|@srcdir\@|$(srcdir)|g'
# The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtoolize libtool
-+bin_SCRIPTS = libtoolize $(host_alias)-libtool
+-bin_SCRIPTS = libtool
++bin_SCRIPTS = $(host_alias)-libtool
- libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
- rm -f libtoolize.tmp libtoolize
-@@ -244,8 +244,8 @@ libtoolize: $(srcdir)/libtoolize.in $(to
+ libtoolize: $(libtoolize_in) $(config_status)
+ $(AM_V_at)rm -f '$@'
+@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
# We used to do this with a 'stamp-vcl' file, but non-gmake builds
# would rerun configure on every invocation, so now we manually
# check the version numbers from the build rule when necessary.
--libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-- @target=libtool; $(rebuild); \
-+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
-+ @target=$(host_alias)-libtool; $(rebuild); \
- if test -f "$$target"; then \
- set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
- test "$$actualver" = "$$correctver" && rebuild=false; \
-@@ -254,8 +254,8 @@ libtool: $(top_builddir)/config.status $
- case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
- done; \
- if $$rebuild; then \
-- echo $(SHELL) ./config.status $$target; \
-- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
-+ echo $(SHELL) ./config.status libtool; \
-+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
- fi
-
- .PHONY: configure-subdirs
-@@ -535,12 +535,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
+-libtool: $(ltmain_sh) $(config_status) $(dotversion)
++$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
+ @$(rebuild); \
+ if test -f '$@'; then \
+ eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
+@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
- LIBTOOL="$(abs_top_builddir)/libtool" \
+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
- tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
+ tst_aclocaldir="$(abs_top_srcdir)/m4"
INSTALLCHECK_ENVIRONMENT = \
- LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
-- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
-+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
+ LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
+- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
++ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
LTDLINCL="-I$(includedir)" \
LIBLTDL="$(libdir)/libltdl.la" \
tst_aclocaldir="$(aclocaldir)"
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
+ LIBTOOL_DEPS=$ltmain
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ AC_SUBST(LIBTOOL)dnl
+
+ _LT_SETUP
+@@ -199,7 +200,7 @@ aix3*)
+ esac
+
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+
+ # All known linkers require a '.a' archive for static linking (except MSVC,
diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
index c3e3e867aa..ad2b110530 100644
--- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
+++ b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
@@ -10,29 +10,31 @@ http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
-Khem Raj <raj.khem@gmail.com>
-Index: libtool-2.4.2/libltdl/m4/libtool.m4
-===================================================================
---- libtool-2.4.2.orig/libltdl/m4/libtool.m4
-+++ libtool-2.4.2/libltdl/m4/libtool.m4
-@@ -1224,27 +1224,27 @@ _LT_DECL([], [ECHO], [1], [An echo progr
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
# ----------------
AC_DEFUN([_LT_WITH_SYSROOT],
[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
--[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+AC_ARG_WITH([libtool-sysroot],
-+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
++[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
-[], [with_sysroot=no])
+[], [with_libtool_sysroot=no])
dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
--case ${with_sysroot} in #(
-+case ${with_libtool_sysroot} in #(
+-case $with_sysroot in #(
++case $with_libtool_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -43,15 +45,14 @@ Index: libtool-2.4.2/libltdl/m4/libtool.m4
no|'')
;; #(
*)
-- AC_MSG_RESULT([${with_sysroot}])
-+ AC_MSG_RESULT([${with_libtool_sysroot}])
+- AC_MSG_RESULT([$with_sysroot])
++ AC_MSG_RESULT([$with_libtool_sysroot])
AC_MSG_ERROR([The sysroot must be an absolute path.])
;;
esac
-Index: libtool-2.4.2/tests/sysroot.at
-===================================================================
---- libtool-2.4.2.orig/tests/sysroot.at
-+++ libtool-2.4.2/tests/sysroot.at
+diff --git a/tests/sysroot.at b/tests/sysroot.at
+--- a/tests/sysroot.at
++++ b/tests/sysroot.at
@@ -64,7 +64,7 @@ while read file; do
done])
@@ -60,7 +61,7 @@ Index: libtool-2.4.2/tests/sysroot.at
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
+ if test PATH = "$shlibpath_var"; then
@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
@@ -79,11 +80,10 @@ Index: libtool-2.4.2/tests/sysroot.at
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
]])
-Index: libtool-2.4.2/tests/testsuite
-===================================================================
---- libtool-2.4.2.orig/tests/testsuite
-+++ libtool-2.4.2/tests/testsuite
-@@ -26676,7 +26676,7 @@ $at_traceon; }
+diff --git a/tests/testsuite b/tests/testsuite
+--- a/tests/testsuite
++++ b/tests/testsuite
+@@ -48945,7 +48945,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -91,8 +91,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -26874,7 +26874,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -101,7 +101,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27051,7 +27051,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -110,7 +110,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27392,7 +27392,7 @@ $at_traceon; }
+@@ -49694,7 +49694,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -118,8 +118,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -27590,7 +27590,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -128,7 +128,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -27767,7 +27767,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
@@ -137,7 +137,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28108,7 +28108,7 @@ $at_traceon; }
+@@ -50443,7 +50443,7 @@ $at_traceon; }
LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
@@ -145,8 +145,8 @@ Index: libtool-2.4.2/tests/testsuite
+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
#???
- if test "$shlibpath_var" = PATH; then
-@@ -28306,7 +28306,7 @@ AM_INIT_AUTOMAKE([foreign])
+ if test PATH = "$shlibpath_var"; then
+@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([lib2.c])
LT_INIT
@@ -155,7 +155,7 @@ Index: libtool-2.4.2/tests/testsuite
AC_SUBST([sysroot])
AC_OUTPUT(Makefile)
_ATEOF
-@@ -28483,7 +28483,7 @@ AM_INIT_AUTOMAKE([foreign])
+@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_SRCDIR([prog.c])
LT_INIT
diff --git a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
deleted file mode 100644
index a82b2ec5a1..0000000000
--- a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Source: http://permalink.gmane.org/gmane.comp.gnu.libtool.bugs/7341
-
-Bug confirmed. When code is compiled with -fstack-protector{,-all},
-GCC "emits extra code to check for buffer overflows, such as stack
-smashing attacks". This extra code uses symbols from libssp, and
-therefore (at least) Cygwin's GCC specs contain:
-
-*link_ssp:
-%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
-
-Therefore, when libtool fails to pass -fstack-protector{,-all} at link
-stage, the link fails.
-
-Patch attached. (Yes, I have a copyright assignment on file.)
-
-Yaakov
-Cygwin/X
-
-From b79f4e117b6f73cc461a2e232063e08481d33300 Mon Sep 17 00:00:00 2001
-From: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
-Date: Tue, 1 Jun 2010 22:18:51 -0500
-Subject: [PATCH] Fix linking with -fstack-protector
-
-* libltdl/config/ltmain.m4sh (func_mode_link): Pass -fstack-protector*
-to the linker as it is required at link time to resolve libssp symbols.
-
-Signed-off-by: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
----
- libltdl/config/ltmain.m4sh | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh 2012-06-01 12:35:44.089638130 -0700
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh 2012-06-01 12:37:25.789643055 -0700
-@@ -5067,13 +5067,14 @@
- # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
- # -F/path path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
-+ # -fstack-protector* stack protector flags for GCC
- # @file GCC response files
- # -tp=* Portland pgcc target processor selection
- # --sysroot=* for sysroot support
- # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
index bb7a761e25..e8824d7db9 100644
--- a/meta/recipes-devtools/libtool/libtool/trailingslash.patch
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -11,11 +11,12 @@ Merged a patch received from Gary Thomas <gary@mlbassoc.com>
Date: 2010/07/12
Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -2167,8 +2167,15 @@ func_mode_install ()
+Updated by: Robert Yang <liezhi.yang@windriver.com>
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -2356,8 +2356,15 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
diff --git a/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch b/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch
new file mode 100644
index 0000000000..b633bc41bb
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/unwind-opt-parsing.patch
@@ -0,0 +1,179 @@
+Cut and paste the pieces of build-aux/options-parser inline into the main
+ltmain.sh code. This removes a performance degradation caused by the
+repeated calls to func_quote_for_eval, the mechanism funclib uses
+to construct the functions used for option parsing.
+
+Upstream-Status: Submitted [Being discussed on mailing list Feb 2015]
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index d5cf07a..0f54303 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -342,11 +342,15 @@ _LT_EOF
+ # libtool_options_prep [ARG]...
+ # -----------------------------
+ # Preparation for options parsed by libtool.
+-libtool_options_prep ()
+-{
++#libtool_options_prep ()
++#{
+ $debug_mode
+
+ # Option defaults:
++ opt_verbose=false
++ opt_warning_types=
++
++ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+@@ -382,19 +386,14 @@ libtool_options_prep ()
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+-
+- # Pass back the list of options.
+- func_quote_for_eval ${1+"$@"}
+- libtool_options_prep_result=$func_quote_for_eval_result
+-}
+-func_add_hook func_options_prep libtool_options_prep
++#}
+
+
+ # libtool_parse_options [ARG]...
+ # ---------------------------------
+ # Provide handling for libtool specific options.
+-libtool_parse_options ()
+-{
++#libtool_parse_options ()
++#{
+ $debug_cmd
+
+ # Perform our own loop to consume as many options as possible in
+@@ -474,29 +473,90 @@ libtool_parse_options ()
+ func_append preserve_args " $_G_opt"
+ ;;
+
+- # An option not handled by this hook function:
+- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+- esac
+- done
++ --debug|-x) debug_cmd='set -x'
++ func_echo "enabling shell trace mode"
++ $debug_cmd
++ ;;
+
++ --no-warnings|--no-warning|--no-warn)
++ set dummy --warnings none ${1+"$@"}
++ shift
++ ;;
+
+- # save modified positional parameters for caller
+- func_quote_for_eval ${1+"$@"}
+- libtool_parse_options_result=$func_quote_for_eval_result
+-}
+-func_add_hook func_parse_options libtool_parse_options
++ --warnings|--warning|-W)
++ test $# = 0 && func_missing_arg $_G_opt && break
++ case " $warning_categories $1" in
++ *" $1 "*)
++ # trailing space prevents matching last $1 above
++ func_append_uniq opt_warning_types " $1"
++ ;;
++ *all)
++ opt_warning_types=$warning_categories
++ ;;
++ *none)
++ opt_warning_types=none
++ warning_func=:
++ ;;
++ *error)
++ opt_warning_types=$warning_categories
++ warning_func=func_fatal_error
++ ;;
++ *)
++ func_fatal_error \
++ "unsupported warning category: '$1'"
++ ;;
++ esac
++ shift
++ ;;
++
++ --verbose|-v) opt_verbose=: ;;
++ --version) func_version ;;
++ -\?|-h) func_usage ;;
++ --help) func_help ;;
++
++ # Separate optargs to long options (plugins may need this):
++ --*=*) func_split_equals "$_G_opt"
++ set dummy "$func_split_equals_lhs" \
++ "$func_split_equals_rhs" ${1+"$@"}
++ shift
++ ;;
++
++ # Separate optargs to short options:
++ -W*)
++ func_split_short_opt "$_G_opt"
++ set dummy "$func_split_short_opt_name" \
++ "$func_split_short_opt_arg" ${1+"$@"}
++ shift
++ ;;
++
++ # Separate non-argument short options:
++ -\?*|-h*|-v*|-x*)
++ func_split_short_opt "$_G_opt"
++ set dummy "$func_split_short_opt_name" \
++ "-$func_split_short_opt_arg" ${1+"$@"}
++ shift
++ ;;
++
++ --) break ;;
++ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
++ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
++ esac
++ done
++#}
+
++# Display all warnings if -W was not given.
++test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+
+ # libtool_validate_options [ARG]...
+ # ---------------------------------
+ # Perform any sanity checks on option settings and/or unconsumed
+ # arguments.
+-libtool_validate_options ()
+-{
++#libtool_validate_options ()
++#{
+ # save first non-option argument
+ if test 0 -lt $#; then
+- nonopt=$1
++ nonopt=$_G_opt
+ shift
+ fi
+
+@@ -537,20 +597,10 @@ libtool_validate_options ()
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
++#}
+
+- # Pass back the unparsed argument list
+- func_quote_for_eval ${1+"$@"}
+- libtool_validate_options_result=$func_quote_for_eval_result
+-}
+-func_add_hook func_validate_options libtool_validate_options
+-
+-
+-# Process options as early as possible so that --help and --version
+-# can return quickly.
+-func_options ${1+"$@"}
+-eval set dummy "$func_options_result"; shift
+-
+-
++# Bail if the options were screwed!
++$exit_cmd $EXIT_FAILURE
+
+ ## ----------- ##
+ ## Main. ##
diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
index 0cd66ad524..6af99f327c 100644
--- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
+++ b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
@@ -6,16 +6,16 @@ i.e. when lt_sysroot is not set, it will still behave the same and add
-L/usr/lib to the relink command.
-Khem Raj <raj.khem@gmail.com>
+Updated by: Robert Yang <liezhi.yang@windriver.com>
-Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
-===================================================================
---- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
-+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
-@@ -6138,7 +6138,7 @@ func_mode_link ()
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -6421,7 +6421,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
-- add_dir="-L$libdir"
+- add_dir=-L$libdir
+ add_dir="-L$lt_sysroot$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.2.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 60643129be..45f1b2f3a9 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -1,7 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.0"
-
RDEPENDS_${PN} += "bash"
#
@@ -23,6 +21,6 @@ do_install_append () {
libtool_sysroot_preprocess () {
rm -rf ${SYSROOT_DESTDIR}${bindir}/*
rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/config/*
+ rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
}
diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
index 7b5c97a97a..508eade326 100644
--- a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb
+++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
@@ -1,7 +1,5 @@
require libtool-${PV}.inc
-PR = "${INC_PR}.0"
-
FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
SRC_URI += "file://prefix.patch"
diff --git a/meta/recipes-devtools/m4/m4-1.4.17.inc b/meta/recipes-devtools/m4/m4-1.4.17.inc
index 790678e288..3133e99c33 100644
--- a/meta/recipes-devtools/m4/m4-1.4.17.inc
+++ b/meta/recipes-devtools/m4/m4-1.4.17.inc
@@ -1,5 +1,7 @@
require m4.inc
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.9.bb b/meta/recipes-devtools/m4/m4-native_1.4.9.bb
deleted file mode 100644
index 23a21d0939..0000000000
--- a/meta/recipes-devtools/m4/m4-native_1.4.9.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require m4-${PV}.inc
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-DEPENDS += "gnu-config-native"
-
-do_configure() {
- install -m 0644 ${STAGING_DATADIR}/gnu-config/config.sub .
- install -m 0644 ${STAGING_DATADIR}/gnu-config/config.guess .
- oe_runconf
-}
-
-inherit native
diff --git a/meta/recipes-devtools/make/make_4.0.bb b/meta/recipes-devtools/make/make_4.1.bb
index 38d328c8a5..a1b0d7c45f 100644
--- a/meta/recipes-devtools/make/make_4.0.bb
+++ b/meta/recipes-devtools/make/make_4.1.bb
@@ -6,7 +6,7 @@ require make.inc
EXTRA_OECONF += "--without-guile"
-SRC_URI[md5sum] = "571d470a7647b455e3af3f92d79f1c18"
-SRC_URI[sha256sum] = "e60686c7afede62cc8c86ad3012cf081ea4887daf9d223ce7115703b2bb2dbdb"
+SRC_URI[md5sum] = "57a7a224a822f94789a587ccbcedff69"
+SRC_URI[sha256sum] = "0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
index dd9bea2619..92d5870f42 100644
--- a/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
+++ b/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb
@@ -5,11 +5,9 @@ SECTION = "base"
SRC_URI = "file://makedevs.c \
file://COPYING.patch"
-FILES_${PN}_append_class-nativesdk = " ${datadir}"
+S = "${WORKDIR}"
-do_configure() {
- install -m 0644 ${WORKDIR}/makedevs.c ${S}/
-}
+FILES_${PN}_append_class-nativesdk = " ${datadir}"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} -o ${S}/makedevs ${S}/makedevs.c
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index bcf68a8e37..28aff9124e 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -14,6 +14,8 @@ SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
file://fix-makefile-to-find-libz.patch \
"
+CLEANBROKEN = "1"
+
S = "${WORKDIR}/git/util/mkelfImage"
CFLAGS += "-fno-stack-protector"
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
index 9885561fe3..b2fcae576a 100644
--- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.39.bb
+++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
@@ -12,11 +12,7 @@ SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.x
file://sysrooted-ldso.patch \
"
-SRC_URI[md5sum] = "38a579a531401eb76f4bab4ccfb774a2"
-SRC_URI[sha256sum] = "fa2881ab4fe72b0504878357f1fc6b17920459b56e8a60dfb083ca28fb64e733"
+SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
+SRC_URI[sha256sum] = "1db24ae779d21ccfed49f22e49a2b7ee43ec0e9197bc206d81cd02f96e91e125"
inherit autotools gettext native pythonnative
-
-do_configure_prepend() {
- sed "s+MKLIBS_VERSION+${PV}+" ${S}/configure.ac
-}
diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index d88520c786..bdb4fed181 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -4,11 +4,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=17;md5=d7747fc87f1eb22b946ef819969503f0"
BRANCH ?= "master"
-SRCREV = "11f2ceabc4ad3f0dd568e0ce68166e4803e0615b"
+SRCREV = "f4eb241519f8d500ce6068a70d2389be39ac5189"
PV = "0.1"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;protocol=git;branch=${BRANCH} \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${BRANCH} \
file://0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
index 44b25d164a..05f1629d58 100644
--- a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
@@ -16,16 +16,16 @@ index d3a02d4..e7e9218 100644
{
- union ubifs_key *t = to;
+ __le32 x[2];
-
+
- t->j32[0] = cpu_to_le32(from->u32[0]);
- t->j32[1] = cpu_to_le32(from->u32[1]);
+ x[0] = cpu_to_le32(from->u32[0]);
+ x[1] = cpu_to_le32(from->u32[1]);
+
+ memcpy(to, &x, 8);
- memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
+ memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
}
-
+
@@ -156,10 +158,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
*/
static inline void key_write_idx(const union ubifs_key *from, void *to)
@@ -35,10 +35,10 @@ index d3a02d4..e7e9218 100644
+
+ x[0] = cpu_to_le32(from->u32[0]);
+ x[1] = cpu_to_le32(from->u32[1]);
-
+
- t->j32[0] = cpu_to_le32(from->u32[0]);
- t->j32[1] = cpu_to_le32(from->u32[1]);
+ memcpy(to, &x, 8);
}
-
+
/**
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 52297c63ba..12daffec47 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -1,20 +1,20 @@
SUMMARY = "Tools for managing memory technology devices"
-SECTION = "base"
-DEPENDS = "zlib lzo e2fsprogs util-linux"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
-# Use the latest version at 26 Oct, 2013
+DEPENDS = "zlib lzo e2fsprogs util-linux"
+
+PV = "1.5.1+git${SRCPV}"
+
SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
SRC_URI = "git://git.infradead.org/mtd-utils.git \
- file://add-exclusion-to-mkfs-jffs2-git-2.patch \
- file://fix-armv7-neon-alignment.patch \
+ file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+ file://fix-armv7-neon-alignment.patch \
"
-PV = "1.5.1+git${SRCPV}"
-
S = "${WORKDIR}/git/"
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
@@ -29,6 +29,8 @@ FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/j
FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
-PARALLEL_MAKE = ""
-
BBCLASSEXTEND = "native"
+
+# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
+# git/.compr.c.dep:47: *** missing separator. Stop.
+PARALLEL_MAKE = ""
diff --git a/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index f6dd3361c9..9cd1c5726c 100644
--- a/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -44,6 +44,10 @@ inherit autotools texinfo
EXTRA_OECONF = "--without-x"
-PARALLEL_MAKEINST = ""
-
BBCLASSEXTEND = "native nativesdk"
+
+do_install_prepend () {
+ # Create bindir to fix parallel installation issues
+ mkdir -p ${D}/${bindir}
+ mkdir -p ${D}/${datadir}
+}
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index 6c71f0ab1f..b2cfe9ad9a 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -35,6 +35,10 @@ inherit autotools texinfo
EXTRA_OECONF = "--without-x"
-PARALLEL_MAKEINST = ""
-
BBCLASSEXTEND = "native nativesdk"
+
+do_install_prepend () {
+ # Create bindir to fix parallel installation issues
+ mkdir -p ${D}/${bindir}
+ mkdir -p ${D}/${datadir}
+}
diff --git a/meta/recipes-devtools/nasm/nasm_2.11.05.bb b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
index fbfd5853b8..4a69a6a92e 100644
--- a/meta/recipes-devtools/nasm/nasm_2.11.05.bb
+++ b/meta/recipes-devtools/nasm/nasm_2.11.06.bb
@@ -6,8 +6,8 @@ COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-SRC_URI[md5sum] = "f6b1db2858cad82bbb0c8c6f3e2b0fb2"
-SRC_URI[sha256sum] = "4a417bcf5cde5d203e228feea3f428a6ff4d700d558e4d79d50a30a695bdfae9"
+SRC_URI[md5sum] = "9d93e8df5f5c005567f47ed6ca3a93d4"
+SRC_URI[sha256sum] = "87b6d97d6981ca468f9dafda44cf1bb1ba122cec329d4d389af5db04fa0c3e6c"
inherit autotools-brokensep
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 693c216ce4..2800a5deb7 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
PROVIDES += "virtual/update-alternatives"
-SRCREV = "eae0d8fa44e8594aa90eadf06e5f4fbeef314509"
+SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
PV = "0.1.8+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/opkg-utils"
diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
index acbe1296bf..4540de2daf 100644
--- a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb
@@ -1,4 +1,4 @@
-SUMMARY = "Base configuration files for opkg"
+SUMMARY = "Architecture-dependent configuration for opkg"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -28,3 +28,6 @@ FILES_${PN} = "${sysconfdir}/opkg/ "
CONFFILES_${PN} += "${sysconfdir}/opkg/arch.conf"
+RREPLACES_${PN} = "opkg-config-base"
+RCONFLICTS_${PN} = "opkg-config-base"
+RPROVIDES_${PN} = "opkg-config-base"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb
deleted file mode 100644
index b121827ac7..0000000000
--- a/meta/recipes-devtools/opkg/opkg-collateral.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Constructs the main configuration file for opkg"
-SECTION = "base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r2"
-
-SRC_URI = "file://opkg.conf.comments \
- file://dest \
- file://src "
-
-OPKGLIBDIR = "${localstatedir}/lib"
-do_compile () {
- cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
- cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
- cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
- echo "lists_dir ext ${OPKGLIBDIR}/opkg" >>${WORKDIR}/opkg.conf
-}
-
-do_install () {
- install -d ${D}${sysconfdir}/opkg
- install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/dest b/meta/recipes-devtools/opkg/opkg-collateral/dest
deleted file mode 100644
index 088ca403da..0000000000
--- a/meta/recipes-devtools/opkg/opkg-collateral/dest
+++ /dev/null
@@ -1 +0,0 @@
-dest root /
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/src b/meta/recipes-devtools/opkg/opkg-collateral/src
deleted file mode 100644
index e69de29bb2..0000000000
--- a/meta/recipes-devtools/opkg/opkg-collateral/src
+++ /dev/null
diff --git a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
new file mode 100644
index 0000000000..18d6abdded
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Keyrings for verifying opkg packages and feeds"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+# Distro-specific keys can be added to this package in two ways:
+#
+# 1) In a .bbappend, add .gpg and/or .asc files to SRC_URI and install them to
+# ${D}${datadir}/opkg/keyrings/ in a do_install_append function. These
+# files should not be named 'key-$name.gpg' to ensure they don't conflict
+# with keys exported as per (2).
+#
+# 2) In a .bbappend, distro config or local.conf, override the variable
+# OPKG_KEYRING_KEYS to contain a space-separated list of key names. For
+# each name, 'gpg --export $name' will be ran to export the public key to a
+# file named 'key-$name.gpg'. The public key must therefore be in the gpg
+# keyrings on the build machine.
+
+OPKG_KEYRING_KEYS ?= ""
+
+do_compile() {
+ for name in ${OPKG_KEYRING_KEYS}; do
+ gpg --export ${name} > ${B}/key-${name}.gpg
+ done
+}
+
+do_install () {
+ install -d ${D}${datadir}/opkg/keyrings/
+ for name in ${OPKG_KEYRING_KEYS}; do
+ install -m 0644 ${B}/key-${name}.gpg ${D}${datadir}/opkg/keyrings/
+ done
+}
+
+FILES_${PN} = "${datadir}/opkg/keyrings"
+
+# We need 'opkg-key' to run the postinst script
+RDEPENDS_${PN} = "opkg"
+
+pkg_postinst_${PN} () {
+#! /bin/sh
+set -e
+
+if [ x"$D" = "x" ]; then
+ # On target
+ opkg-key populate
+else
+ exit 1
+fi
+}
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch
new file mode 100644
index 0000000000..ae319ce2bb
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch
@@ -0,0 +1,78 @@
+From 87bec8300a1122829b2ed565db7da5bacfa88919 Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Sun, 12 Oct 2014 09:59:53 +0000
+Subject: [PATCH] opkg-key: Backport improvements
+
+The improvements to opkg-key made for v0.3.0 are backported. The rest of v0.3.0
+needs further testing and bugfixing prior to release, but the improvements to
+opkg-key have been tested and work well.
+
+ 1) opkg-key: Add 'reset' option
+
+ This option removes the keyrings used to verify package signatures,
+ effectively resetting opkg to the initial state where it recognises no
+ keys.
+
+ 2) opkg-key: Add 'populate' option
+
+ This option causes all keyrings in /usr/share/opkg/keyrings to be
+ imported. Thus distributions may install their keys into this directory
+ and use 'opkg-key populate' to ensure the correct keys are loaded.
+
+ 3) opkg-key: Improve usage output
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+Upstream-status: Backport
+---
+ utils/opkg-key | 26 ++++++++++++++++++++++----
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+diff --git a/utils/opkg-key b/utils/opkg-key
+index 266bb66..085f1e8 100755
+--- a/utils/opkg-key
++++ b/utils/opkg-key
+@@ -10,12 +10,17 @@ usage() {
+ echo
+ echo "Manage opkg's list of trusted keys"
+ echo
+- echo " opkg-key add <file> - add the key contained in <file> ('-' for stdin)"
+- echo " opkg-key del <keyid> - remove the key <keyid>"
+- echo " opkg-key list - list keys"
++ echo "Commands and arguments:"
++ echo " add <file> - Add the key contained in <file> ('-' for stdin)"
++ echo " del <keyid> - Remove the key <keyid>"
++ echo " list - List keys"
++ echo " fingerprint - List keys with fingerprints"
++ echo " reset - Remove all keys, resetting the keyring"
++ echo " populate - Import keys from /usr/share/opkg/keyrings"
++ echo " help - Print this usage message and exit"
+ echo
+ echo "Options:"
+- echo " -o <root> Use <root> as the offline root directory"
++ echo " -o <root> - Use <root> as the offline root directory"
+ echo
+ }
+
+@@ -64,6 +69,19 @@ case "$command" in
+ echo "Executing: $GPG $*"
+ $GPG $*
+ ;;
++ reset)
++ rm -f $ROOT/etc/opkg/trusted.gpg $ROOT/etc/opkg/trusted.gpg~
++ rm -f $ROOT/etc/opkg/secring.gpg $ROOT/etc/opkg/secring.gpg~
++ rm -f $ROOT/etc/opkg/trustdb.gpg $ROOT/etc/opkg/trustdb.gpg~
++ echo "OK"
++ ;;
++ populate)
++ for f in $ROOT/usr/share/opkg/keyrings/*.gpg; do
++ echo "Importing keys from '`basename $f`'..."
++ $GPG --quiet --batch --import "$f"
++ done
++ echo "OK"
++ ;;
+ help)
+ usage
+ ;;
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
index c684534efb..48de923590 100644
--- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch
+++ b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
@@ -1,4 +1,4 @@
-From 5d707bbfcafd88b8b5b5821972c8c958fc3b2039 Mon Sep 17 00:00:00 2001
+From 60c3f93e95a3ca54ef0a7eebc5ef29a5d92d3110 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:20:22 +0000
Subject: [PATCH 2/2] opkg-0.2.x: add-exclude
@@ -15,7 +15,7 @@ so there is no need to free the data.
v2: Use xmalloc instead of malloc and xrealloc instead of realloc. In opkg,
these functions are guaranteed not to return NULL.
-Upstream-Status: Pending
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
@@ -28,10 +28,10 @@ Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
4 files changed, 34 insertions(+)
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
-index 1e65bad..9c4c854 100644
+index 4eee37b..1ab63fb 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
-@@ -442,6 +442,7 @@ opkg_conf_init(void)
+@@ -447,6 +447,7 @@ opkg_conf_init(void)
pkg_dest_list_init(&conf->pkg_dest_list);
pkg_dest_list_init(&conf->tmp_dest_list);
nv_pair_list_init(&conf->arch_list);
@@ -40,7 +40,7 @@ index 1e65bad..9c4c854 100644
return 0;
}
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 6045a58..ad58849 100644
+index 2f189e0..6d6e613 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -51,6 +51,8 @@ struct opkg_conf
@@ -53,10 +53,10 @@ index 6045a58..ad58849 100644
int restrict_to_default_dest;
pkg_dest_t *default_dest;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index d2d279e..b572e18 100644
+index 41bf206..eb630d1 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -212,6 +212,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -204,6 +204,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
continue;
}
@@ -80,7 +80,7 @@ index d2d279e..b572e18 100644
if (satisfying_pkg != NULL) {
satisfier_entry_pkg = satisfying_pkg;
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index 0315d41..67366b9 100644
+index 6378380..f10d10b 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -45,6 +45,7 @@ enum {
@@ -91,7 +91,7 @@ index 0315d41..67366b9 100644
ARGS_OPT_NOACTION,
ARGS_OPT_DOWNLOAD_ONLY,
ARGS_OPT_NODEPS,
-@@ -95,6 +96,7 @@ static struct option long_options[] = {
+@@ -97,6 +98,7 @@ static struct option long_options[] = {
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
{"add-dest", 1, 0, ARGS_OPT_ADD_DEST},
@@ -99,7 +99,7 @@ index 0315d41..67366b9 100644
{"test", 0, 0, ARGS_OPT_NOACTION},
{"tmp-dir", 1, 0, 't'},
{"tmp_dir", 1, 0, 't'},
-@@ -198,6 +200,18 @@ args_parse(int argc, char *argv[])
+@@ -200,6 +202,18 @@ args_parse(int argc, char *argv[])
}
free(tuple);
break;
@@ -118,7 +118,7 @@ index 0315d41..67366b9 100644
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
-@@ -282,6 +296,7 @@ usage()
+@@ -287,6 +301,7 @@ usage()
printf("\t--offline-root <dir> offline installation of packages.\n");
printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n");
printf("\t--add-dest <name>:<path> Register destination with given path\n");
@@ -127,5 +127,5 @@ index 0315d41..67366b9 100644
printf("\t than the higher version one if more\n");
printf("\t than one candidate is found.\n");
--
-2.0.4
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
deleted file mode 100644
index d618206a62..0000000000
--- a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 41425d67d3589b1912416a17f740d6407c7834f2 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 8 Oct 2014 19:53:13 +0800
-Subject: [PATCH] libopkg/opkg_remove.c: avoid remove pkg repeatly with option
- --force-removal-of-dependent-packages
-
-While remove pkg with '--force-removal-of-dependent-packages',
-pkg may be added to pkgs remove list multiple times, add status
-check to make sure pkg only be removed once.
-
-Upstream-Status: Backport
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
----
- libopkg/opkg_remove.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c
-index 34f9154..a225e41 100644
---- a/libopkg/opkg_remove.c
-+++ b/libopkg/opkg_remove.c
-@@ -250,6 +250,14 @@ opkg_remove_pkg(pkg_t *pkg, int from_upgrade)
- if ((parent_pkg = pkg->parent) == NULL)
- return 0;
-
-+ /* While remove pkg with '--force-removal-of-dependent-packages',
-+ pkg may be added to remove list multiple times, add status
-+ check to make sure pkg only be removed once. */
-+ if (conf->force_removal_of_dependent_packages &&
-+ pkg->state_flag & SF_FILELIST_CHANGED &&
-+ pkg->state_status == SS_NOT_INSTALLED)
-+ return 0;
-+
- /* only attempt to remove dependent installed packages if
- * force_depends is not specified or the package is being
- * replaced.
---
-1.9.1
diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
index bcca56c6ce..c2d244d26e 100644
--- a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
+++ b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch
@@ -1,11 +1,11 @@
-From 610207c9bc82f20c77d6f234465e36857c997ea0 Mon Sep 17 00:00:00 2001
+From 2e2ccc7e7fc81a7eee2d004d3644efbc1be1ad73 Mon Sep 17 00:00:00 2001
From: Paul Barker <paul@paulbarker.me.uk>
Date: Fri, 28 Mar 2014 15:19:08 +0000
Subject: [PATCH 1/2] opkg-0.2.x: no-install-recommends
Add the ability to not install ANY recommended packages.
-Upstream-Status: Pending
+Upstream-Status: Accepted for v0.3.0 release with modifications
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
@@ -15,7 +15,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
-index 38fa375..6045a58 100644
+index e0e045a..2f189e0 100644
--- a/libopkg/opkg_conf.h
+++ b/libopkg/opkg_conf.h
@@ -82,6 +82,7 @@ struct opkg_conf
@@ -27,10 +27,10 @@ index 38fa375..6045a58 100644
char *overlay_root;
int query_all;
diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
-index a4df7de..d2d279e 100644
+index 8ab6508..41bf206 100644
--- a/libopkg/pkg_depends.c
+++ b/libopkg/pkg_depends.c
-@@ -19,6 +19,7 @@
+@@ -21,6 +21,7 @@
#include <ctype.h>
#include "pkg.h"
@@ -38,7 +38,7 @@ index a4df7de..d2d279e 100644
#include "opkg_utils.h"
#include "pkg_hash.h"
#include "opkg_message.h"
-@@ -204,7 +205,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
+@@ -196,7 +197,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
/* user request overrides package recommendation */
if (satisfying_pkg != NULL
&& (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST)
@@ -48,18 +48,18 @@ index a4df7de..d2d279e 100644
"%s at user request\n",
pkg->name, satisfying_pkg->name);
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
-index b711511..0315d41 100644
+index a1d121f..6378380 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
-@@ -50,6 +50,7 @@ enum {
- ARGS_OPT_NODEPS,
+@@ -51,6 +51,7 @@ enum {
ARGS_OPT_AUTOREMOVE,
ARGS_OPT_CACHE,
+ ARGS_OPT_COMBINE,
+ ARGS_OPT_NOINSTALL_RECOMMENDS,
};
static struct option long_options[] = {
-@@ -89,6 +90,7 @@ static struct option long_options[] = {
+@@ -91,6 +92,7 @@ static struct option long_options[] = {
{"noaction", 0, 0, ARGS_OPT_NOACTION},
{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
{"nodeps", 0, 0, ARGS_OPT_NODEPS},
@@ -67,7 +67,7 @@ index b711511..0315d41 100644
{"offline", 1, 0, 'o'},
{"offline-root", 1, 0, 'o'},
{"add-arch", 1, 0, ARGS_OPT_ADD_ARCH},
-@@ -199,6 +201,9 @@ args_parse(int argc, char *argv[])
+@@ -201,6 +203,9 @@ args_parse(int argc, char *argv[])
case ARGS_OPT_NOACTION:
conf->noaction = 1;
break;
@@ -77,7 +77,7 @@ index b711511..0315d41 100644
case ARGS_OPT_DOWNLOAD_ONLY:
conf->download_only = 1;
break;
-@@ -293,6 +298,8 @@ usage()
+@@ -300,6 +305,8 @@ usage()
printf("\t--noaction No action -- test only\n");
printf("\t--download-only No action -- download only\n");
printf("\t--nodeps Do not follow dependencies\n");
@@ -87,5 +87,5 @@ index b711511..0315d41 100644
printf("\t Remove package and all dependencies\n");
printf("\t--autoremove Remove packages that were installed\n");
--
-1.9.1
+2.1.3
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments b/meta/recipes-devtools/opkg/opkg/opkg.conf
index e1fdada9b5..c2e9e92f95 100644
--- a/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments
+++ b/meta/recipes-devtools/opkg/opkg/opkg.conf
@@ -24,3 +24,5 @@
# Offline mode (for use in constructing flash images offline)
#option offline_root target
+# Default destination for installed packages
+dest root /
diff --git a/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
new file mode 100644
index 0000000000..8bde02af0d
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch
@@ -0,0 +1,32 @@
+From d480d837ff57e855d1cf0b63054d6b1ad7aaf2ee Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 6 Jan 2015 17:54:43 -0800
+Subject: [PATCH] Makefile.am: remove ACLOCAL_AMFLAGS = -I shave -I m4
+
+Fixed:
+libtoolize: error: AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL_AMFLAGS=-I shave.
+
+They are already included by configure.ac:
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_MACRO_DIR([shave])
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8baa62c..6679f77 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-ACLOCAL_AMFLAGS = -I shave -I m4
+-
+ SUBDIRS = libbb libopkg src tests utils man
+
+
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.2.bb b/meta/recipes-devtools/opkg/opkg_0.2.2.bb
deleted file mode 100644
index 867ff7a8ee..0000000000
--- a/meta/recipes-devtools/opkg/opkg_0.2.2.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require opkg.inc
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://no-install-recommends.patch \
- file://add-exclude.patch \
- file://opkg-configure.service \
- file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
-"
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-SRC_URI[md5sum] = "b3ecef90d67d2aed2a14c2116a027482"
-SRC_URI[sha256sum] = "aa554ce7538544aac4f69e8274a0f9b8b433b8c3b1d00704bd393f713303a12b"
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
index 56c54b6ab7..23a32e61cd 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
@@ -9,18 +9,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
PE = "1"
-# Werror gives all kinds bounds issuses with gcc 4.3.3
-do_configure_prepend() {
- sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
-}
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://no-install-recommends.patch \
+ file://add-exclude.patch \
+ file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \
+ file://opkg-configure.service \
+ file://opkg.conf \
+ file://0001-opkg-key-Backport-improvements.patch \
+"
+
+SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd"
+SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086"
inherit autotools pkgconfig systemd
-python () {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- pn = d.getVar('PN', True)
- d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
-}
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
target_localstatedir := "${localstatedir}"
OPKGLIBDIR = "${target_localstatedir}/lib"
@@ -38,23 +41,20 @@ EXTRA_OECONF = "\
--with-opkglibdir=${OPKGLIBDIR} \
"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg"
+# Werror gives all kinds bounds issuses with gcc 4.3.3
+do_configure_prepend() {
+ sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+}
-PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
+do_install_append () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+ echo "option lists_dir ${OPKGLIBDIR}/opkg" >>${D}${sysconfdir}/opkg/opkg.conf
-FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg"
-FILES_libopkg-staticdev = "${libdir}/*.a"
-FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
-FILES_${PN} += "${systemd_unitdir}/system/"
-
-do_install_append() {
# We need to create the lock directory
install -d ${D}${OPKGLIBDIR}/opkg
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
@@ -67,10 +67,24 @@ do_install_append() {
# The installed binary is 'opkg-cl' but people and scripts often expect
# it to just be 'opkg'
ln -sf opkg-cl ${D}${bindir}/opkg
-}
-do_install_append() {
rm ${D}${bindir}/update-alternatives
}
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
+
+FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg"
+FILES_libopkg-staticdev = "${libdir}/*.a"
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+FILES_${PN} += "${systemd_unitdir}/system/"
+
BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/meta/recipes-devtools/orc/orc_0.4.18.bb b/meta/recipes-devtools/orc/orc_0.4.18.bb
deleted file mode 100644
index 2375d8c696..0000000000
--- a/meta/recipes-devtools/orc/orc_0.4.18.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require orc.inc
-
-PR = "${INC_PR}.0"
-
-SRC_URI[orc.md5sum] = "1a2552e8d127526c48d644fe6437b377"
-SRC_URI[orc.sha256sum] = "34d3c8a7259f42bed4dcfbc106c5e3d0cc8e17eeaa73128d1c5eaf92883a6a24"
diff --git a/meta/recipes-devtools/orc/orc.inc b/meta/recipes-devtools/orc/orc_0.4.23.bb
index b1348310ab..0e07731ac6 100644
--- a/meta/recipes-devtools/orc/orc.inc
+++ b/meta/recipes-devtools/orc/orc_0.4.23.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "http://code.entropywave.com/projects/orc/"
LICENSE = "BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-INC_PR = "r2"
-
-SRC_URI = "http://code.entropywave.com/download/orc/orc-${PV}.tar.gz;name=orc"
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz;name=orc"
+SRC_URI[orc.md5sum] = "72e0612ace54d77aa2f7a006348ee81a"
+SRC_URI[orc.sha256sum] = "767eaebce2941737b43368225ec54598b3055ca78b4dc50c4092f5fcdc0bdfe7"
inherit autotools pkgconfig
diff --git a/meta/recipes-devtools/patch/patch.inc b/meta/recipes-devtools/patch/patch.inc
index b49226a1b2..332b97a85e 100644
--- a/meta/recipes-devtools/patch/patch.inc
+++ b/meta/recipes-devtools/patch/patch.inc
@@ -9,8 +9,5 @@ S = "${WORKDIR}/patch-${PV}"
inherit autotools update-alternatives
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[attr] = "--enable-xattr,--disable-xattr,attr"
-
ALTERNATIVE_${PN} = "patch"
ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-devtools/patch/patch/patch-CVE-2015-1196.patch b/meta/recipes-devtools/patch/patch/patch-CVE-2015-1196.patch
new file mode 100644
index 0000000000..d408346ac2
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch/patch-CVE-2015-1196.patch
@@ -0,0 +1,200 @@
+From 4e9269a5fc1fe80a1095a92593dd85db871e1fd3 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
+Date: Mon, 19 Jan 2015 23:18:30 +0100
+Subject: [PATCH] Make sure symlinks don't point outside working directory
+ (CVE-2015-1196)
+
+When creating symlinks from git-style patches, make sure the symlinks don't
+point above the current working directory. Otherwise, a subsequent patch could
+use the symlink to write outside the working directory.
+
+* src/pch.c (symlink_target_is_valid): New function to check for valid symlink
+targets.
+* src/util.c (move_file): Use symlink_target_is_valid() here.
+* tests/symlinks: Add valid and invalid symlink test cases.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Backport
+
+---
+ NEWS | 3 ++
+ src/pch.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/pch.h | 1 +
+ src/util.c | 7 +++++++
+ tests/symlinks | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 117 insertions(+)
+
+diff --git a/NEWS b/NEWS
+index 42afed7..d3f1c2d 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,6 @@
++* With git-style patches, symlinks that point outside the working directory
++ will no longer be created.
++
+ Changes in version 2.7.1:
+
+ * Two critical bug fixes in the "diff --git" format support.
+diff --git a/src/pch.c b/src/pch.c
+index 55e1504..f05ef83 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -454,6 +454,60 @@ name_is_valid (char const *name)
+ return is_valid;
+ }
+
++bool
++symlink_target_is_valid (char const *target, char const *to)
++{
++ bool is_valid;
++
++ if (IS_ABSOLUTE_FILE_NAME (to))
++ is_valid = true;
++ else if (IS_ABSOLUTE_FILE_NAME (target))
++ is_valid = false;
++ else
++ {
++ unsigned int depth = 0;
++ char const *t;
++
++ is_valid = true;
++ t = to;
++ while (*t)
++ {
++ while (*t && ! ISSLASH (*t))
++ t++;
++ if (ISSLASH (*t))
++ {
++ while (ISSLASH (*t))
++ t++;
++ depth++;
++ }
++ }
++
++ t = target;
++ while (*t)
++ {
++ if (*t == '.' && *++t == '.' && (! *++t || ISSLASH (*t)))
++ {
++ if (! depth--)
++ {
++ is_valid = false;
++ break;
++ }
++ }
++ else
++ {
++ while (*t && ! ISSLASH (*t))
++ t++;
++ depth++;
++ }
++ while (ISSLASH (*t))
++ t++;
++ }
++ }
++
++ /* Allow any symlink target if we are in the filesystem root. */
++ return is_valid || cwd_is_root (to);
++}
++
+ /* Determine what kind of diff is in the remaining part of the patch file. */
+
+ static enum diff
+diff --git a/src/pch.h b/src/pch.h
+index 0c7ff62..58861b0 100644
+--- a/src/pch.h
++++ b/src/pch.h
+@@ -37,6 +37,7 @@ bool pch_write_line (lin, FILE *);
+ bool there_is_another_patch (bool, mode_t *);
+ char *pfetch (lin) _GL_ATTRIBUTE_PURE;
+ char pch_char (lin) _GL_ATTRIBUTE_PURE;
++bool symlink_target_is_valid (char const *, char const *);
+ int another_hunk (enum diff, bool);
+ int pch_says_nonexistent (bool) _GL_ATTRIBUTE_PURE;
+ size_t pch_line_len (lin) _GL_ATTRIBUTE_PURE;
+diff --git a/src/util.c b/src/util.c
+index 66ae90f..636eded 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -470,6 +470,13 @@ move_file (char const *from, bool *from_needs_removal,
+ read_fatal ();
+ buffer[size] = 0;
+
++ if (! symlink_target_is_valid (buffer, to))
++ {
++ fprintf (stderr, "symbolic link target '%s' is invalid\n",
++ buffer);
++ fatal_exit (0);
++ }
++
+ if (! backup)
+ {
+ if (unlink (to) == 0)
+diff --git a/tests/symlinks b/tests/symlinks
+index 96626b3..6211026 100644
+--- a/tests/symlinks
++++ b/tests/symlinks
+@@ -146,6 +146,59 @@ ncheck 'test ! -L symlink'
+
+ # --------------------------------------------------------------
+
++# Patch should not create symlinks which point outside the working directory.
++
++cat > symlink-target.diff <<EOF
++diff --git a/dir/foo b/dir/foo
++new file mode 120000
++index 0000000..cad2309
++--- /dev/null
+++++ b/dir/foo
++@@ -0,0 +1 @@
+++../foo
++\ No newline at end of file
++EOF
++
++check 'patch -p1 < symlink-target.diff || echo "Status: $?"' <<EOF
++patching symbolic link dir/foo
++EOF
++
++cat > bad-symlink-target1.diff <<EOF
++diff --git a/bar b/bar
++new file mode 120000
++index 0000000..cad2309
++--- /dev/null
+++++ b/bar
++@@ -0,0 +1 @@
+++/bar
++\ No newline at end of file
++EOF
++
++check 'patch -p1 < bad-symlink-target1.diff || echo "Status: $?"' <<EOF
++patching symbolic link bar
++symbolic link target '/bar' is invalid
++Status: 2
++EOF
++
++cat > bad-symlink-target2.diff <<EOF
++diff --git a/baz b/baz
++new file mode 120000
++index 0000000..cad2309
++--- /dev/null
+++++ b/baz
++@@ -0,0 +1 @@
+++../baz
++\ No newline at end of file
++EOF
++
++check 'patch -p1 < bad-symlink-target2.diff || echo "Status: $?"' <<EOF
++patching symbolic link baz
++symbolic link target '../baz' is invalid
++Status: 2
++EOF
++
++# --------------------------------------------------------------
++
+ # The backup file of a new symlink is an empty regular file.
+
+ check 'patch -p1 --backup < create-symlink.diff || echo "Status: $?"' <<EOF
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/patch/patch_2.7.1.bb b/meta/recipes-devtools/patch/patch_2.7.1.bb
index 3db318a7ec..1a3b9b1201 100644
--- a/meta/recipes-devtools/patch/patch_2.7.1.bb
+++ b/meta/recipes-devtools/patch/patch_2.7.1.bb
@@ -1,6 +1,7 @@
require patch.inc
LICENSE = "GPLv3"
+SRC_URI += "file://patch-CVE-2015-1196.patch"
SRC_URI[md5sum] = "95dd8d7e41dcbcecdd5cd88ef915378d"
SRC_URI[sha256sum] = "c05f28668c3474bc63adcd48abae921d15e71c254fbebdbaeda40456d64039d5"
diff --git a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
index 1b4ee0c715..ea3d78ebaa 100644
--- a/meta/recipes-devtools/pax-utils/pax-utils_0.8.1.bb
+++ b/meta/recipes-devtools/pax-utils/pax-utils_0.9.2.bb
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz"
-SRC_URI[md5sum] = "bc42279c5aff3682c12be40f72805cec"
-SRC_URI[sha256sum] = "844ff25b1a11bcef92ef34b22f576f226a772b67196818656f8874513438f5b9"
+SRC_URI[md5sum] = "34c41888cec67759c21333bef13e950c"
+SRC_URI[sha256sum] = "578801df0661b1b7b8fed0ce4a9859239f919fd37529907681e51091a1bcb4de"
RDEPENDS_${PN} += "bash python"
diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 26241e884c..9ccd417398 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.41.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -1,15 +1,13 @@
SUMMARY = "XML::Parser - A perl module for parsing XML documents"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
DEPENDS += "expat expat-native"
-PR = "r3"
-
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
-SRC_URI[md5sum] = "c320d2ffa459e6cdc6f9f59c1185855e"
-SRC_URI[sha256sum] = "b48197cd2265a26c5f016489f11a7b450d8833cb8b3d6a46ee15975740894de9"
+SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
+SRC_URI[sha256sum] = "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216"
S = "${WORKDIR}/XML-Parser-${PV}"
diff --git a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
index 1fcb3224e8..b72afc0ca4 100644
--- a/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
+++ b/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
@@ -6,7 +6,7 @@ on top of an underlying XML parsing module to maintain XML files \
where the original uses plain Perl or SAX parsers."
HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7dbb3e2241fac8457967053fc1a1ddb"
DEPENDS += "libxml-parser-perl"
diff --git a/meta/recipes-devtools/perl/perl-native_5.20.0.bb b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
index 01d40fcff2..586a347c0f 100644
--- a/meta/recipes-devtools/perl/perl-native_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
index 041471a046..e39663c7d6 100644
--- a/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
+++ b/meta/recipes-devtools/perl/perl-rdepends_5.20.0.inc
@@ -1841,6 +1841,7 @@ RDEPENDS_${PN}-module-overloading += "${PN}-module-warnings"
RDEPENDS_${PN}-module-overload += "${PN}-module-mro"
RDEPENDS_${PN}-module-overload += "${PN}-module-scalar-util"
RDEPENDS_${PN}-module-overload += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
RDEPENDS_${PN}-module-package-constants += "${PN}-module-if"
RDEPENDS_${PN}-module-package-constants += "${PN}-module-strict"
RDEPENDS_${PN}-module-package-constants += "${PN}-module-vars"
diff --git a/meta/recipes-devtools/perl/perl_5.20.0.bb b/meta/recipes-devtools/perl/perl_5.20.0.bb
index bc7866b61f..db65202ec8 100644
--- a/meta/recipes-devtools/perl/perl_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.20.0.bb
@@ -1,7 +1,7 @@
SUMMARY = "Perl scripting language"
HOMEPAGE = "http://www.perl.org/"
SECTION = "devel"
-LICENSE = "Artistic-1.0 | GPL-1.0"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
# We need gnugrep (for -I)
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig-0.28/0001-Strip-system-library-directories-reliably.patch b/meta/recipes-devtools/pkgconfig/pkgconfig-0.28/0001-Strip-system-library-directories-reliably.patch
new file mode 100644
index 0000000000..84d0dd8ca7
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig-0.28/0001-Strip-system-library-directories-reliably.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Backport (will be in 0.29)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From ce1a2416ce0f0bd9a8a8a5caaf7dad20cda4d47d Mon Sep 17 00:00:00 2001
+From: Andrew Oakley <aoakley@espial.com>
+Date: Tue, 29 Apr 2014 13:14:35 +0100
+Subject: [PATCH] Strip system library directories reliably
+
+This loop was changed from a while loop to a for loop in commit
+9bf6277b, but the iterator is now advanced twice each time round the
+loop.
+---
+ pkg.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/pkg.c b/pkg.c
+index 3697fec..c847c95 100644
+--- a/pkg.c
++++ b/pkg.c
+@@ -917,7 +917,6 @@ verify_package (Package *pkg)
+ }
+ system_dir_iter = system_dir_iter->next;
+ }
+- iter = iter->next;
+ }
+ g_list_free (system_directories);
+
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb
index 3070da99d3..57a22d4c78 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb
@@ -4,6 +4,7 @@ SRC_URI += " \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
file://obsolete_automake_macros.patch \
+ file://0001-Strip-system-library-directories-reliably.patch \
"
SRC_URI[md5sum] = "aa3c86e67551adc3ac865160e34a2a0d"
diff --git a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
index 41b9a6e49e..7dc45c68f2 100644
--- a/meta/recipes-devtools/postinst-intercept/postinst-intercept_1.0.bb
+++ b/meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
@@ -2,12 +2,12 @@ SUMMARY = "Postinstall scriptlets"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-FILES_${PN}_append_class-nativesdk = " ${datadir}/postinst-intercepts/*"
+FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
-do_install_append_class-nativesdk() {
+do_install() {
install -d ${D}${datadir}/postinst-intercepts
install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
@@ -15,5 +15,5 @@ do_install_append_class-nativesdk() {
install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
}
-BBCLASSEXTEND = "nativesdk"
+inherit nativesdk
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch b/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
deleted file mode 100644
index b5c81c9d3e..0000000000
--- a/meta/recipes-devtools/pseudo/files/0001-pseudo_has_unload-add-function.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-From be97cb958f2934fa398fc8e344b25b84ebd4e90c Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 25 Aug 2013 19:22:09 -0500
-Subject: [PATCH] pseudo_has_unload: add function
-
-Various wrappers checked for a non-null pseudo_get_value("PSEUDO_UNLOAD") to
-determine whether the environment should include the pseudo variables. None
-of those checks freed the returned value when it was not null. The new
-check function does.
-
-The new check function also sees whether PSEUDO_UNLOAD was defined in the
-environment that should be used in the wrapped system call. This allows
-pkg_postinst scripts to strip out the LD_PRELOAD setting, for example before
-invoking qemu to execute commands in an environment that does not have
-libpseudo.so.
-
-[YOCTO #4843]
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- ports/common/guts/execv.c | 2 +-
- ports/common/guts/execve.c | 2 +-
- ports/common/guts/execvp.c | 2 +-
- ports/common/guts/fork.c | 2 +-
- ports/linux/newclone/pseudo_wrappers.c | 2 +-
- ports/linux/oldclone/pseudo_wrappers.c | 2 +-
- ports/unix/guts/popen.c | 2 +-
- ports/unix/guts/system.c | 2 +-
- pseudo.h | 1 +
- pseudo_util.c | 27 +++++++++++++++++++++++++++
- 10 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/ports/common/guts/execv.c b/ports/common/guts/execv.c
-index 763e1f9..3e1f820 100644
---- a/ports/common/guts/execv.c
-+++ b/ports/common/guts/execv.c
-@@ -19,7 +19,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execve.c b/ports/common/guts/execve.c
-index a003657..ff6a44e 100644
---- a/ports/common/guts/execve.c
-+++ b/ports/common/guts/execve.c
-@@ -20,7 +20,7 @@
- }
-
- new_environ = pseudo_setupenvp(envp);
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(new_environ))
- new_environ = pseudo_dropenvp(new_environ);
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/execvp.c b/ports/common/guts/execvp.c
-index 5e75be7..04253c3 100644
---- a/ports/common/guts/execvp.c
-+++ b/ports/common/guts/execvp.c
-@@ -20,7 +20,7 @@
- }
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- /* if exec() fails, we may end up taking signals unexpectedly...
-diff --git a/ports/common/guts/fork.c b/ports/common/guts/fork.c
-index df8abd7..bebe3b0 100644
---- a/ports/common/guts/fork.c
-+++ b/ports/common/guts/fork.c
-@@ -12,7 +12,7 @@
- */
- if (rc == 0) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/newclone/pseudo_wrappers.c b/ports/linux/newclone/pseudo_wrappers.c
-index 9dbac42..257e8bb 100644
---- a/ports/linux/newclone/pseudo_wrappers.c
-+++ b/ports/linux/newclone/pseudo_wrappers.c
-@@ -28,7 +28,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/linux/oldclone/pseudo_wrappers.c b/ports/linux/oldclone/pseudo_wrappers.c
-index c0ce5dd..598d966 100644
---- a/ports/linux/oldclone/pseudo_wrappers.c
-+++ b/ports/linux/oldclone/pseudo_wrappers.c
-@@ -22,7 +22,7 @@ int wrap_clone_child(void *args) {
-
- if (!(flags & CLONE_VM)) {
- pseudo_setupenv();
-- if (!pseudo_get_value("PSEUDO_UNLOAD")) {
-+ if (!pseudo_has_unload(NULL)) {
- pseudo_reinit_libpseudo();
- } else {
- pseudo_dropenv();
-diff --git a/ports/unix/guts/popen.c b/ports/unix/guts/popen.c
-index 0ca16b0..5d44c0e 100644
---- a/ports/unix/guts/popen.c
-+++ b/ports/unix/guts/popen.c
-@@ -9,7 +9,7 @@
- * in ways that avoid our usual enforcement of the environment.
- */
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_popen(command, mode);
-diff --git a/ports/unix/guts/system.c b/ports/unix/guts/system.c
-index 028b372..6351592 100644
---- a/ports/unix/guts/system.c
-+++ b/ports/unix/guts/system.c
-@@ -9,7 +9,7 @@
- return 1;
-
- pseudo_setupenv();
-- if (pseudo_get_value("PSEUDO_UNLOAD"))
-+ if (pseudo_has_unload(NULL))
- pseudo_dropenv();
-
- rc = real_system(command);
-diff --git a/pseudo.h b/pseudo.h
-index 56760a4..f600793 100644
---- a/pseudo.h
-+++ b/pseudo.h
-@@ -28,6 +28,7 @@ extern void pseudo_init_client(void);
- void pseudo_dump_env(char **envp);
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-+int pseudo_has_unload(char * const *envp);
-
- #include "pseudo_tables.h"
-
-diff --git a/pseudo_util.c b/pseudo_util.c
-index 8d0969e..16c70e0 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -95,6 +95,33 @@ dump_env(char **envp) {
- }
- #endif
-
-+int
-+pseudo_has_unload(char * const *envp) {
-+ static const char unload[] = "PSEUDO_UNLOAD";
-+ static size_t unload_len = strlen(unload);
-+ size_t i = 0;
-+
-+ /* Is it in the caller environment? */
-+ if (NULL != getenv(unload))
-+ return 1;
-+
-+ /* Is it in the environment cache? */
-+ if (pseudo_util_initted == -1)
-+ pseudo_init_util();
-+ while (pseudo_env[i].key && strcmp(pseudo_env[i].key, unload))
-+ ++i;
-+ if (pseudo_env[i].key && pseudo_env[i].value)
-+ return 1;
-+
-+ /* Is it in the operational environment? */
-+ while (envp && *envp) {
-+ if ((!strncmp(*envp, unload, unload_len)) && ('=' == (*envp)[unload_len]))
-+ return 1;
-+ ++envp;
-+ }
-+ return 0;
-+}
-+
- /* Caller must free memory! */
- char *
- pseudo_get_value(const char *key) {
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch b/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
deleted file mode 100644
index e8eaf13f74..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-1.5.1-install-directory-mode.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Backport
-
-when install command sets the created directory mode, pseudo will change
-the mode of the directory to 0700 incorrectly.
-
-Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -25,6 +25,7 @@
- stat_rc = base_fstatat(dirfd, path, &buf, AT_SYMLINK_NOFOLLOW);
- #endif
- if (stat_rc != -1) {
-+ buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
- pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
- } else {
- pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
diff --git a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch b/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
deleted file mode 100644
index 7b1f82d577..0000000000
--- a/meta/recipes-devtools/pseudo/files/pseudo-fchmodat-permissions.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-commit 7e67d082737b3df4788caf85fedd607b3acd9786
-Author: Peter Seebach <peter.seebach@windriver.com>
-Date: Fri May 16 15:53:06 2014 -0500
-
- permissions updates: improve fchmodat, mask out write bits
-
- Upstream-Status: Backport of several patches from 1.6 branch,
- combined.
-
- Backport from pseudo 1.6 of improvements to fchmodat (handle
- AT_SYMLINK_NOFOLLOW by rejecting it if the host system does,
- to make GNU tar happier), also mask out write bits from filesystem
- modes to avoid security problems.
-
- Also start tracking umask so we can use the right modes for
- open, mkdir, and mknod.
-
- The 1.6 patches are:
-
- 87c53ea58befef48677846693aab445df1850e16
- 3c716e0bab4f0cfe4be84caa9ce5fd5e3f5e2a23
- c98e4f43b5d6499748a5057134408f4ba4854fb4
- 2f71a021b725c1aa415439209a89327f0b997d02
- 14925786b55202d8147b0af719038e8a23ef73c0
-
-diff --git a/ChangeLog.txt b/ChangeLog.txt
-index 113f675..cc966ce 100644
---- a/ChangeLog.txt
-+++ b/ChangeLog.txt
-@@ -1,3 +1,18 @@
-+2014-05-27:
-+ * (seebs) start noticing umask, mask it out from open or mkdir
-+ calls rather than relying on underlying open/mkdir to do it.
-+
-+2014-05-16:
-+ * (seebs) fchmodat: don't drop flags, report failures, to improve
-+ compatibility/consistency. Cache the knowledge that
-+ AT_SYMLINK_NOFOLLOW gets ENOTSUP.
-+ * (seebs) mask out group/other write bits in real filesystem to
-+ reduce risks when assembling a rootfs including world-writeable
-+ directories.
-+
-+2014-05-15:
-+ * (seebs) drop flags when calling fchmodat() to appease GNU tar.
-+
- 2013-02-27:
- * (seebs) Oh, hey, what if I took out my debug messages?
- * (seebs) update docs a bit to reduce bitrot
-diff --git a/makewrappers b/makewrappers
-index e87cc56..0127766 100755
---- a/makewrappers
-+++ b/makewrappers
-@@ -204,6 +204,7 @@ class Function:
- 'uid_t': '0',
- 'int': '-1',
- 'long': '-1',
-+ 'mode_t': '0',
- 'ssize_t': '-1'
- }
-
-diff --git a/ports/darwin/guts/open.c b/ports/darwin/guts/open.c
-index c66cc15..520bb70 100644
---- a/ports/darwin/guts/open.c
-+++ b/ports/darwin/guts/open.c
-@@ -9,6 +9,9 @@
- struct stat buf = { };
- int existed = 1;
- int save_errno;
-+
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_FORCE_ASYNCH
- flags &= ~O_SYNC;
- #endif
-diff --git a/ports/linux/guts/__xmknodat.c b/ports/linux/guts/__xmknodat.c
-index 59b4f2f..0888b8a 100644
---- a/ports/linux/guts/__xmknodat.c
-+++ b/ports/linux/guts/__xmknodat.c
-@@ -9,6 +9,9 @@
- pseudo_msg_t *msg;
- struct stat64 buf;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- /* we don't use underlying call, so _ver is irrelevant to us */
- (void) ver;
-
-diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c
-index 8460073..4053549 100644
---- a/ports/linux/guts/openat.c
-+++ b/ports/linux/guts/openat.c
-@@ -10,6 +10,9 @@
- int existed = 1;
- int save_errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c
-index 59a92ce..69a953c 100644
---- a/ports/unix/guts/fchmodat.c
-+++ b/ports/unix/guts/fchmodat.c
-@@ -8,6 +8,7 @@
- */
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-+ static int picky_fchmodat = 0;
-
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
-@@ -15,6 +16,16 @@
- return -1;
- }
- if (flags & AT_SYMLINK_NOFOLLOW) {
-+ /* Linux, as of this writing, will always reject this.
-+ * GNU tar relies on getting the rejection. To cut down
-+ * on traffic, we check for the failure, and if we saw
-+ * a failure previously, we reject it right away and tell
-+ * the caller to retry.
-+ */
-+ if (picky_fchmodat) {
-+ errno = ENOTSUP;
-+ return -1;
-+ }
- rc = base_lstat(path, &buf);
- } else {
- rc = base_stat(path, &buf);
-@@ -50,13 +61,22 @@
-
- /* user bits added so "root" can always access files. */
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
-- /* note: if path was a symlink, and AT_NOFOLLOW_SYMLINKS was
-+ /* note: if path was a symlink, and AT_SYMLINK_NOFOLLOW was
- * specified, we already bailed previously. */
- real_chmod(path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)));
- #else
-- real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ rc = real_fchmodat(dirfd, path, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)), flags);
-+ /* AT_SYMLINK_NOFOLLOW isn't supported by fchmodat. GNU tar
-+ * tries to use it anyway, figuring it can just retry if that
-+ * fails. So we want to report that *particular* failure instead
-+ * of doing the fallback.
-+ */
-+ if (rc == -1 && errno == ENOTSUP && (flags & AT_SYMLINK_NOFOLLOW)) {
-+ picky_fchmodat = 1;
-+ return -1;
-+ }
- #endif
-- /* we ignore a failure from underlying fchmod, because pseudo
-+ /* we otherwise ignore failures from underlying fchmod, because pseudo
- * may believe you are permitted to change modes that the filesystem
- * doesn't. Note that we also don't need to know whether the
- * file might be a (pseudo) block device or some such; pseudo
-diff --git a/ports/unix/guts/mkdirat.c b/ports/unix/guts/mkdirat.c
-index e846b70..e0b6af9 100644
---- a/ports/unix/guts/mkdirat.c
-+++ b/ports/unix/guts/mkdirat.c
-@@ -6,11 +6,14 @@
- * wrap_mkdirat(int dirfd, const char *path, mode_t mode) {
- * int rc = -1;
- */
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
- return -1;
- }
-+
- rc = real_mkdir(path, PSEUDO_FS_MODE(mode, 1));
- #else
- rc = real_mkdirat(dirfd, path, PSEUDO_FS_MODE(mode, 1));
-diff --git a/ports/unix/guts/mknodat.c b/ports/unix/guts/mknodat.c
-index 6fd5b42..5d8d47c 100644
---- a/ports/unix/guts/mknodat.c
-+++ b/ports/unix/guts/mknodat.c
-@@ -10,6 +10,9 @@
- PSEUDO_STATBUF buf;
- int save_errno = errno;
-
-+ /* mask out mode bits appropriately */
-+ mode = mode & ~pseudo_umask;
-+
- #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
- if (dirfd != AT_FDCWD) {
- errno = ENOSYS;
-diff --git a/ports/unix/guts/umask.c b/ports/unix/guts/umask.c
-new file mode 100644
-index 0000000..6b060d3
---- /dev/null
-+++ b/ports/unix/guts/umask.c
-@@ -0,0 +1,14 @@
-+/*
-+ * Copyright (c) 2014 Wind River Systems; see
-+ * guts/COPYRIGHT for information.
-+ *
-+ * mode_t umask(mode_t mask)
-+ * mode_t rc = 0;
-+ */
-+
-+ pseudo_umask = mask;
-+ rc = real_umask(mask);
-+
-+/* return rc;
-+ * }
-+ */
-diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in
-index 8460a65..e0e9739 100644
---- a/ports/unix/wrapfuncs.in
-+++ b/ports/unix/wrapfuncs.in
-@@ -67,3 +67,4 @@ void sync(void); /* async_skip= */
- int syncfs(int fd); /* async_skip=0 */
- int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); /* async_skip=0 */
- int msync(void *addr, size_t length, int flags); /* async_skip=0 */
-+mode_t umask(mode_t mask);
-diff --git a/pseudo_client.c b/pseudo_client.c
-index b6d11a6..535c810 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -71,6 +71,8 @@ int pseudo_disabled = 0;
- int pseudo_allow_fsync = 0;
- static int pseudo_local_only = 0;
-
-+int pseudo_umask = 022;
-+
- static char **fd_paths = NULL;
- static int nfds = 0;
- static int messages = 0;
-@@ -219,6 +221,9 @@ pseudo_init_client(void) {
- if (!pseudo_disabled && !pseudo_inited) {
- char *pseudo_path = 0;
-
-+ pseudo_umask = umask(022);
-+ umask(pseudo_umask);
-+
- pseudo_path = pseudo_prefix_path(NULL);
- if (pseudo_prefix_dir_fd == -1) {
- if (pseudo_path) {
-diff --git a/pseudo_client.h b/pseudo_client.h
-index f36a772..5bf820e 100644
---- a/pseudo_client.h
-+++ b/pseudo_client.h
-@@ -72,6 +72,8 @@ extern char *pseudo_passwd;
- extern size_t pseudo_chroot_len;
- extern int pseudo_nosymlinkexp;
-
-+extern int pseudo_umask;
-+
- /* Root can read and write files, and enter directories which have no
- * read, write, or execute permissions. (But can't execute files without
- * execute permissions!)
-@@ -85,6 +87,6 @@ extern int pseudo_nosymlinkexp;
- * None of this will behave very sensibly if umask has 0700 bits in it;
- * this is a known limitation.
- */
--#define PSEUDO_FS_MODE(mode, isdir) ((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0))
--#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0700) | ((user_mode & 0700)))
-+#define PSEUDO_FS_MODE(mode, isdir) (((mode) | S_IRUSR | S_IWUSR | ((isdir) ? S_IXUSR : 0)) & ~(S_IWGRP | S_IWOTH))
-+#define PSEUDO_DB_MODE(fs_mode, user_mode) (((fs_mode) & ~0722) | ((user_mode & 0722)))
-
diff --git a/meta/recipes-devtools/pseudo/files/shutdownping.patch b/meta/recipes-devtools/pseudo/files/shutdownping.patch
deleted file mode 100644
index 8af8e0b594..0000000000
--- a/meta/recipes-devtools/pseudo/files/shutdownping.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-There is a potential issue with the fastop code in pseudo since a process may
-exit and allow some other function to run before the server has processed
-the commands run by the process. Issues have been see with unpredictable
-file permissions.
-
-To avoid this, we ping the server before exitting which guarantees it has
-processed the current command queue.
-
-Debugged-by: RP
-Fix written by peter.seebach@windriver.com
-
-Upstream-Status: Submitted
-
-[YOCTO #5132]
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index f58ce4c..20943b6 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -75,6 +75,9 @@ static int nfds = 0;
- static int messages = 0;
- static struct timeval message_time = { .tv_sec = 0 };
- static int pseudo_inited = 0;
-+
-+static int sent_messages = 0;
-+
- int pseudo_nosymlinkexp = 0;
-
- /* note: these are int, not uid_t/gid_t, so I can use 'em with scanf */
-@@ -711,6 +714,11 @@ client_ping(void) {
- return 0;
- }
-
-+static void
-+void_client_ping(void) {
-+ client_ping();
-+}
-+
- int
- pseudo_fd(int fd, int how) {
- int newfd;
-@@ -1043,6 +1051,11 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
- /* disable wrappers */
- pseudo_antimagic();
-
-+ if (!sent_messages) {
-+ sent_messages = 1;
-+ atexit(void_client_ping);
-+ }
-+
- if (op == OP_RENAME) {
- va_list ap;
- va_start(ap, buf);
diff --git a/meta/recipes-devtools/pseudo/files/symver.patch b/meta/recipes-devtools/pseudo/files/symver.patch
deleted file mode 100644
index 8d1b377ec0..0000000000
--- a/meta/recipes-devtools/pseudo/files/symver.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-When running as pseudo-nativesdk, we might need to run host binaries
-linked against the host libc. Having a 2.14 libc dependency from memcpy is
-problematic so instruct the linker to use older symbols.
-
-Upstream-Status: Pending
-
-RP 2012/4/22
-
-Index: pseudo-1.3/pseudo.h
-===================================================================
---- pseudo-1.3.orig/pseudo.h 2012-04-22 12:17:59.078909060 +0000
-+++ pseudo-1.3/pseudo.h 2012-04-22 12:32:42.954888587 +0000
-@@ -29,6 +29,13 @@
- int pseudo_set_value(const char *key, const char *value);
- char *pseudo_get_value(const char *key);
-
-+#ifdef __amd64__
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.2.5")
-+#else
-+#define GLIBC_COMPAT_SYMBOL(SYM) __asm__(".symver " #SYM "," #SYM "@GLIBC_2.0")
-+#endif
-+GLIBC_COMPAT_SYMBOL(memcpy);
-+
- #include "pseudo_tables.h"
-
- extern void pseudo_debug_verbose(void);
diff --git a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch
deleted file mode 100644
index b1bb9fb59c..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0001-pseudo_client.c-protect-pwd_lck-against-magic.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From e11468a47369596f57c5e99bd0a3dd58b2c6d5e0 Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 12 Oct 2014 08:27:14 -0500
-Subject: [PATCH 1/3] pseudo_client.c: protect pwd_lck against magic
-
-While attempting to diagnose unexpected uid/gid assignment I added
---without-passwd-fallback to the pseudo build. This caused build
-failures due to inability to lock /etc/passwd.
-
-Instrumentation revealed that attempts to create the lock file ended up
-with pseudo_etc_file() creating the correct lock name, but the
-subsequent open had an extra PSEUDO_PASSWD directory prefix causing
-it to fail.
-
-Inspection of pseudo_client shows the only other use of PSEUDO_ETC_FILE
-to be protected against magic. Applying the same shield to the
-unprotected calls in pseudo_pwd_lck_{open,close} fixes the issue.
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- pseudo_client.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index 8deaa1b..442dd19 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -416,20 +416,24 @@ pseudo_pwd_lck_open(void) {
- }
- }
- pseudo_pwd_lck_close();
-+ pseudo_antimagic();
- pseudo_pwd_lck_fd = PSEUDO_ETC_FILE(".pwd.lock",
- pseudo_pwd_lck_name, O_RDWR | O_CREAT);
-+ pseudo_magic();
- return pseudo_pwd_lck_fd;
- }
-
- int
- pseudo_pwd_lck_close(void) {
- if (pseudo_pwd_lck_fd != -1) {
-+ pseudo_antimagic();
- close(pseudo_pwd_lck_fd);
- if (pseudo_pwd_lck_name) {
- unlink(pseudo_pwd_lck_name);
- free(pseudo_pwd_lck_name);
- pseudo_pwd_lck_name = 0;
- }
-+ pseudo_magic();
- pseudo_pwd_lck_fd = -1;
- return 0;
- } else {
---
-1.8.5.5
diff --git a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch
deleted file mode 100644
index f3fef26d48..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From f05def2bbd5507084672bc9072ffe0e5101e9b47 Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 12 Oct 2014 11:35:57 -0500
-Subject: [PATCH 2/3] pseudo_util: modify interface to pseudo_etc_file
-
-* Make the search directory pointers const: there is no reason why this
- function should be allowed to mutate the directories.
-
-* Change the search directory argument from an array of pointers to a
- pointer-to-pointers to prepare for an upcoming enhancement.
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- pseudo.h | 2 +-
- pseudo_client.c | 2 +-
- pseudo_util.c | 4 ++--
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/pseudo.h b/pseudo.h
-index 92020e4..05813c1 100644
---- a/pseudo.h
-+++ b/pseudo.h
-@@ -86,7 +86,7 @@ extern int pseudo_logfile(char *defname);
- extern ssize_t pseudo_sys_path_max(void);
- extern ssize_t pseudo_path_max(void);
- #define PSEUDO_PWD_MAX 4096
--extern int pseudo_etc_file(const char *filename, char *realname, int flags, char *path[], int dircount);
-+extern int pseudo_etc_file(const char *filename, char *realname, int flags, const char **search_dirs, int dircount);
- extern void pseudo_stat32_from64(struct stat *, const struct stat64 *);
- extern void pseudo_stat64_from32(struct stat64 *, const struct stat *);
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index 442dd19..7a4d7fa 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -93,7 +93,7 @@ gid_t pseudo_egid;
- gid_t pseudo_sgid;
- gid_t pseudo_fgid;
-
--#define PSEUDO_ETC_FILE(filename, realname, flags) pseudo_etc_file(filename, realname, flags, (char *[]) { pseudo_chroot, pseudo_passwd, PSEUDO_PASSWD_FALLBACK }, PSEUDO_PASSWD_FALLBACK ? 3 : 2)
-+#define PSEUDO_ETC_FILE(filename, realname, flags) pseudo_etc_file(filename, realname, flags, (const char *[]) { pseudo_chroot, pseudo_passwd, PSEUDO_PASSWD_FALLBACK }, PSEUDO_PASSWD_FALLBACK ? 3 : 2)
-
- /* helper function to make a directory, just like mkdir -p.
- * Can't use system() because the child shell would end up trying
-diff --git a/pseudo_util.c b/pseudo_util.c
-index e4e1fc8..647d3ad 100644
---- a/pseudo_util.c
-+++ b/pseudo_util.c
-@@ -1264,7 +1264,7 @@ FILE *pseudo_host_etc_group_file = &pseudo_fake_group_file;
- #endif
-
- int
--pseudo_etc_file(const char *file, char *realname, int flags, char *search_dirs[], int dircount) {
-+pseudo_etc_file(const char *file, char *realname, int flags, const char **search_dirs, int dircount) {
- char filename[pseudo_path_max()];
- int rc = -1;
-
-@@ -1280,7 +1280,7 @@ pseudo_etc_file(const char *file, char *realname, int flags, char *search_dirs[]
- return -1;
- }
- for (i = 0; i < dircount; ++i) {
-- char *s = search_dirs[i];
-+ const char *s = search_dirs[i];
- if (!s)
- continue;
- #if PSEUDO_PORT_DARWIN
---
-1.8.5.5
diff --git a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch b/meta/recipes-devtools/pseudo/pseudo-1.6.2/0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch
deleted file mode 100644
index 8303b5ce5f..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo-1.6.2/0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 09f04dc36f21c179235109b3dcddce9dda9a8ba8 Mon Sep 17 00:00:00 2001
-From: "Peter A. Bigot" <pab@pabigot.com>
-Date: Sun, 12 Oct 2014 12:17:48 -0500
-Subject: [PATCH 3/3] pseudo_client.c: support multiple directories in
- PSEUDO_PASSWD
-
-For OpenEmbedded it is highly unlikely that using the build host passwd
-file is the right approach. Most packages can be built with a pseudo
-that was configured --without-passwd-fallback, since
-PSEUDO_PASSWD=${STAGING_DIR_TARGET} suffices.
-
-This fails when building images, because image.bbclass (correctly)
-overrides to PSEUDO_PASSWD=${IMAGE_ROOTFS}. However, the rootfs
-/etc/passwd is not created until the post-install phase of base-passwd,
-which is long after a passwd file is required. For example, the smart
-RPM interface wants to look up uid 0 right away. The right solution
-here is to look first in ${IMAGE_ROOTFS}, then fallback to
-a location holding immutable files with the minimum user/group settings
-necessary to successfully get base-passwd onto the target.
-
-Rather than rework pseudo to change PSEUDO_PASSWD_FALLBACK to be a
-run-time rather than compile-time specification, rework the handling of
-PSEUDO_PASSWD so that it is a colon-separated list of directories that
-are processed in order.
-
-Upstream-Status: Pending
-Signed-off-by: Peter A. Bigot <pab@pabigot.com>
----
- pseudo_client.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 49 insertions(+), 1 deletion(-)
-
-diff --git a/pseudo_client.c b/pseudo_client.c
-index 7a4d7fa..b52b86a 100644
---- a/pseudo_client.c
-+++ b/pseudo_client.c
-@@ -75,6 +75,8 @@ int pseudo_umask = 022;
-
- static char **fd_paths = NULL;
- static int nfds = 0;
-+static const char **passwd_paths = NULL;
-+static int npasswd_paths = 0;
- static int messages = 0;
- static struct timeval message_time = { .tv_sec = 0 };
- static int pseudo_inited = 0;
-@@ -93,7 +95,7 @@ gid_t pseudo_egid;
- gid_t pseudo_sgid;
- gid_t pseudo_fgid;
-
--#define PSEUDO_ETC_FILE(filename, realname, flags) pseudo_etc_file(filename, realname, flags, (const char *[]) { pseudo_chroot, pseudo_passwd, PSEUDO_PASSWD_FALLBACK }, PSEUDO_PASSWD_FALLBACK ? 3 : 2)
-+#define PSEUDO_ETC_FILE(filename, realname, flags) pseudo_etc_file(filename, realname, flags, passwd_paths, npasswd_paths)
-
- /* helper function to make a directory, just like mkdir -p.
- * Can't use system() because the child shell would end up trying
-@@ -117,6 +119,42 @@ mkdir_p(char *path) {
- (void) mkdir(path, 0755);
- }
-
-+static int
-+build_passwd_paths(const char **paths)
-+{
-+ int np = 0;
-+
-+ if (pseudo_chroot) {
-+ if (paths) {
-+ paths[np] = pseudo_chroot;
-+ }
-+ ++np;
-+ }
-+ if (pseudo_passwd) {
-+ const char *cp = pseudo_passwd;
-+ const char *next = strchr(cp, ':');
-+ while (next) {
-+ if (paths) {
-+ paths[np] = strndup(cp, next-cp);
-+ }
-+ ++np;
-+ cp = next+1;
-+ next = strchr(cp, ':');
-+ }
-+ if (paths) {
-+ paths[np] = strdup(cp);
-+ }
-+ ++np;
-+ }
-+ if (PSEUDO_PASSWD_FALLBACK) {
-+ if (paths) {
-+ paths[np] = PSEUDO_PASSWD_FALLBACK;
-+ }
-+ ++np;
-+ }
-+ return np;
-+}
-+
- void
- pseudo_init_client(void) {
- char *env;
-@@ -329,6 +367,16 @@ pseudo_init_client(void) {
- }
- free(env);
-
-+ npasswd_paths = build_passwd_paths(NULL);
-+ if (npasswd_paths) {
-+ passwd_paths = malloc(npasswd_paths * sizeof(*passwd_paths));
-+ if (!passwd_paths) {
-+ pseudo_diag("couldn't allocate space for passwd paths.\n");
-+ exit(1);
-+ }
-+ build_passwd_paths(passwd_paths);
-+ }
-+
- pseudo_inited = 1;
- }
- if (!pseudo_disabled)
---
-1.8.5.5
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
deleted file mode 100644
index 8d562ecbf7..0000000000
--- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require pseudo.inc
-
-PR = "r5"
-
-SRC_URI = " \
- http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://0001-pseudo_has_unload-add-function.patch \
- file://shutdownping.patch \
- file://pseudo-1.5.1-install-directory-mode.patch \
- file://pseudo-fchmodat-permissions.patch \
-"
-
-SRC_URI_append_class-nativesdk = " file://symver.patch"
-
-SRC_URI_append_class-native = " file://symver.patch"
-
-SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172"
-SRC_URI[sha256sum] = "3b896f592f4d568569bd02323fad2d6b8c398e16ca36ee5a8947d2ff6c1d3d52"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async"
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
index 261c8d3abd..3d5b1fbd3e 100644
--- a/meta/recipes-devtools/pseudo/pseudo_1.6.2.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_1.6.4.bb
@@ -2,15 +2,12 @@ require pseudo.inc
SRC_URI = " \
http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://0001-pseudo_client.c-protect-pwd_lck-against-magic.patch \
- file://0002-pseudo_util-modify-interface-to-pseudo_etc_file.patch \
- file://0003-pseudo_client.c-support-multiple-directories-in-PSEU.patch \
file://fallback-passwd \
file://fallback-group \
"
-SRC_URI[md5sum] = "4d7b4f9d1b4aafa680ce94a5a9a52f1f"
-SRC_URI[sha256sum] = "c72be92689511ced7c419149c6aaa1b1a9e4dfc6409d1f16ab72cc35bc1e376a"
+SRC_URI[md5sum] = "2fb800c90d643bfce55e1ce5ca67f3b3"
+SRC_URI[sha256sum] = "25a7528f9191f74cceccc08a90c00086f2b3a9f6b900ea419a4f092de9a06775"
PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 8c6f06ab46..b505910fb5 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,7 +1,7 @@
require pseudo.inc
-SRCREV = "0dc29e7c67f25d0978a7da5cd8965514912c5b36"
-PV = "1.6.2+git${SRCPV}"
+SRCREV = "41389d4279d6a5f694615906217f481605b183b7"
+PV = "1.6.4+git${SRCPV}"
DEFAULT_PREFERENCE = "-1"
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc
index 5c2629e851..12f775efeb 100644
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ b/meta/recipes-devtools/python/python-2.7-manifest.inc
@@ -1,18 +1,22 @@
# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: 'scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-PROVIDES+="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
FILES_${PN}-2to3="${bindir}/2to3 ${libdir}/python2.7/lib2to3 "
+SUMMARY_${PN}-argparse="Python command line argument parser"
+RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
+FILES_${PN}-argparse="${libdir}/python2.7/argparse.* "
+
SUMMARY_${PN}-audio="Python Audio Handling"
RDEPENDS_${PN}-audio="${PN}-core"
FILES_${PN}-audio="${libdir}/python2.7/wave.* ${libdir}/python2.7/chunk.* ${libdir}/python2.7/sndhdr.* ${libdir}/python2.7/lib-dynload/ossaudiodev.so ${libdir}/python2.7/lib-dynload/audioop.so ${libdir}/python2.7/audiodev.* ${libdir}/python2.7/sunaudio.* ${libdir}/python2.7/sunau.* ${libdir}/python2.7/toaiff.* "
@@ -37,9 +41,13 @@ SUMMARY_${PN}-compression="Python high-level compression support"
RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so "
+SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts."
+RDEPENDS_${PN}-contextlib="${PN}-core"
+FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* "
+
SUMMARY_${PN}-core="Python interpreter and core modules"
RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
RDEPENDS_${PN}-crypt="${PN}-core"
@@ -274,7 +282,7 @@ RDEPENDS_${PN}-zlib="${PN}-core"
FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/meta/recipes-devtools/python/python-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
deleted file mode 100644
index b2850a3831..0000000000
--- a/meta/recipes-devtools/python/python-argparse_1.2.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Python command-line parsing library"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8"
-SRCNAME = "argparse"
-PR = "r4"
-RDEPENDS_${PN} += "python-codecs python-textutils"
-
-SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c"
-SRC_URI[sha256sum] = "ddaf4b0a618335a32b6664d4ae038a1de8fbada3b25033f9021510ed2b3941a4"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/python/python-distribute_0.6.32.bb b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
index 70001457e0..aa0763377d 100644
--- a/meta/recipes-devtools/python/python-distribute_0.6.32.bb
+++ b/meta/recipes-devtools/python/python-distribute_0.6.32.bb
@@ -50,6 +50,14 @@ RDEPENDS_${PN} = "\
python-compression \
"
+RDEPENDS_${PN}_class-target = "\
+ python-distutils \
+ python-compression \
+ python-netclient \
+ python-email \
+ python-shell \
+"
+
RPROVIDES_${PN} += "python-setuptools"
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb b/meta/recipes-devtools/python/python-git_0.3.6.bb
index 02a0eac040..80cdd7cde0 100644
--- a/meta/recipes-devtools/python/python-git_0.3.2.RC1.bb
+++ b/meta/recipes-devtools/python/python-git_0.3.6.bb
@@ -10,8 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
DEPENDS = "python-gitdb"
SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-SRC_URI[md5sum] = "849082fe29adc653a3621465213cab96"
-SRC_URI[sha256sum] = "fd6786684a0d0dd7ebb961da754e3312fafe0c8e88f55ceb09858aa0af6094e0"
+
+SRC_URI[md5sum] = "87404ab9e0fcee81e660e932b3d9f2c6"
+SRC_URI[sha256sum] = "f3f42ca085eedbd3a9956b5e639de58bbe77a119f6b3d5c3af27669a2322c4a9"
S = "${WORKDIR}/GitPython-${PV}"
diff --git a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb b/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
index 9e961528b9..f0083bdb1a 100644
--- a/meta/recipes-devtools/python/python-gitdb_0.5.4.bb
+++ b/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
@@ -6,8 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
DEPENDS = "python-async python-smmap"
SRC_URI = "https://pypi.python.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
-SRC_URI[md5sum] = "25353bb8d3ea527ba443dd88cd4e8a1c"
-SRC_URI[sha256sum] = "de5d2dac0daec4a9cd7bb1ae1cd42d53510dcf597397c608c12a154b69ad3783"
+
+SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
+SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
S = "${WORKDIR}/gitdb-${PV}"
diff --git a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch b/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
new file mode 100644
index 0000000000..5279e7c3b4
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Pending
+
+Avoids parallel make races linking errors when making Parser/PGEN
+
+- Implements Richard Purdie's idea
+
+Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: Python-2.7.9/Makefile.pre.in
+===================================================================
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -610,12 +610,10 @@ Modules/grpmodule.o: $(srcdir)/Modules/g
+
+ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
+
+-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
++$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
+ @$(MKDIR_P) Include
+- $(MAKE) $(PGEN)
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+- $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
+
+ $(PGEN): $(PGENOBJS)
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch
index 0526031ada..8ca89e7c51 100644
--- a/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/meta/recipes-devtools/python/python-native/multilib.patch
@@ -1,15 +1,6 @@
-commit 248279e54467a8cd5cde98fc124d1d1384703513
-Author: Yu Ke <ke.yu@intel.com>
-Date: Tue Jun 28 21:21:29 2011 +0800
-
- SUSE patch for the lib64 issue
-
- see detail in http://bugs.python.org/issue1294959
-
- also rebased a bit for Yocto python 2.6.6
-
- Picked-by: Yu Ke <ke.yu@intel.com>
+Rebased for Python 2.7.9
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2011/09/29
The python recipe building was failing because python-native
@@ -21,10 +12,10 @@ Upstream-Status: Inappropriate [oe-specific]
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.2/Include/pythonrun.h
+Index: Python-2.7.9/Include/pythonrun.h
===================================================================
---- Python-2.7.2.orig/Include/pythonrun.h
-+++ Python-2.7.2/Include/pythonrun.h
+--- Python-2.7.9.orig/Include/pythonrun.h
++++ Python-2.7.9/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -33,10 +24,10 @@ Index: Python-2.7.2/Include/pythonrun.h
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.2/Lib/distutils/command/install.py
+Index: Python-2.7.9/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.2.orig/Lib/distutils/command/install.py
-+++ Python-2.7.2/Lib/distutils/command/install.py
+--- Python-2.7.9.orig/Lib/distutils/command/install.py
++++ Python-2.7.9/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -55,11 +46,11 @@ Index: Python-2.7.2/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.2/Lib/pydoc.py
+Index: Python-2.7.9/Lib/pydoc.py
===================================================================
---- Python-2.7.2.orig/Lib/pydoc.py
-+++ Python-2.7.2/Lib/pydoc.py
-@@ -352,7 +352,7 @@ class Doc:
+--- Python-2.7.9.orig/Lib/pydoc.py
++++ Python-2.7.9/Lib/pydoc.py
+@@ -383,7 +383,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
@@ -68,11 +59,11 @@ Index: Python-2.7.2/Lib/pydoc.py
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.2/Lib/site.py
+Index: Python-2.7.9/Lib/site.py
===================================================================
---- Python-2.7.2.orig/Lib/site.py
-+++ Python-2.7.2/Lib/site.py
-@@ -300,13 +300,19 @@ def getsitepackages():
+--- Python-2.7.9.orig/Lib/site.py
++++ Python-2.7.9/Lib/site.py
+@@ -288,13 +288,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
@@ -95,11 +86,11 @@ Index: Python-2.7.2/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-Index: Python-2.7.2/Lib/test/test_dl.py
+Index: Python-2.7.9/Lib/test/test_dl.py
===================================================================
---- Python-2.7.2.orig/Lib/test/test_dl.py
-+++ Python-2.7.2/Lib/test/test_dl.py
-@@ -5,10 +5,11 @@
+--- Python-2.7.9.orig/Lib/test/test_dl.py
++++ Python-2.7.9/Lib/test/test_dl.py
+@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
dl = import_module('dl', deprecated=True)
@@ -113,11 +104,11 @@ Index: Python-2.7.2/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.2/Lib/trace.py
+Index: Python-2.7.9/Lib/trace.py
===================================================================
---- Python-2.7.2.orig/Lib/trace.py
-+++ Python-2.7.2/Lib/trace.py
-@@ -762,10 +762,10 @@ def main(argv=None):
+--- Python-2.7.9.orig/Lib/trace.py
++++ Python-2.7.9/Lib/trace.py
+@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
@@ -130,19 +121,19 @@ Index: Python-2.7.2/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.2/Makefile.pre.in
+Index: Python-2.7.9/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
- # Install prefix for architecture-independent files
- prefix= @prefix@
-@@ -97,7 +98,7 @@ LIBDIR= @libdir@
+ # Multiarch directory (may be empty)
+ MULTIARCH= @MULTIARCH@
+@@ -106,7 +107,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -151,7 +142,7 @@ Index: Python-2.7.2/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -532,6 +533,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -597,6 +598,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -159,7 +150,7 @@ Index: Python-2.7.2/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -566,7 +568,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
+@@ -639,7 +641,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -168,10 +159,10 @@ Index: Python-2.7.2/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.2/Modules/getpath.c
+Index: Python-2.7.9/Modules/getpath.c
===================================================================
---- Python-2.7.2.orig/Modules/getpath.c
-+++ Python-2.7.2/Modules/getpath.c
+--- Python-2.7.9.orig/Modules/getpath.c
++++ Python-2.7.9/Modules/getpath.c
@@ -116,9 +116,11 @@
#define EXEC_PREFIX PREFIX
#endif
@@ -195,10 +186,10 @@ Index: Python-2.7.2/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.2/Python/getplatform.c
+Index: Python-2.7.9/Python/getplatform.c
===================================================================
---- Python-2.7.2.orig/Python/getplatform.c
-+++ Python-2.7.2/Python/getplatform.c
+--- Python-2.7.9.orig/Python/getplatform.c
++++ Python-2.7.9/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -213,11 +204,11 @@ Index: Python-2.7.2/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.2/Python/sysmodule.c
+Index: Python-2.7.9/Python/sysmodule.c
===================================================================
---- Python-2.7.2.orig/Python/sysmodule.c
-+++ Python-2.7.2/Python/sysmodule.c
-@@ -1416,6 +1416,8 @@ _PySys_Init(void)
+--- Python-2.7.9.orig/Python/sysmodule.c
++++ Python-2.7.9/Python/sysmodule.c
+@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyString_FromString(Py_GetPlatform()));
@@ -226,11 +217,11 @@ Index: Python-2.7.2/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.2/configure.in
+Index: Python-2.7.9/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -629,6 +629,10 @@ SunOS*)
+--- Python-2.7.9.orig/configure.ac
++++ Python-2.7.9/configure.ac
+@@ -736,6 +736,11 @@ SunOS*)
;;
esac
@@ -238,6 +229,7 @@ Index: Python-2.7.2/configure.in
+AC_MSG_CHECKING(LIB)
+LIB=`basename ${libdir}`
+AC_MSG_RESULT($LIB)
++
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
diff --git a/meta/recipes-devtools/python/python-native/nohostlibs.patch b/meta/recipes-devtools/python/python-native/nohostlibs.patch
index 09c3fb808a..8a452e94dc 100644
--- a/meta/recipes-devtools/python/python-native/nohostlibs.patch
+++ b/meta/recipes-devtools/python/python-native/nohostlibs.patch
@@ -1,25 +1,28 @@
Upstream-Status: Inappropriate [embedded specific]
-2011/09/29
-rebased for python-2.7.2
+2014/12/15
+Rebased for python-2.7.9
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.9/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -369,8 +369,8 @@ class PyBuildExt(build_ext):
+--- Python-2.7.9.orig/setup.py
++++ Python-2.7.9/setup.py
+@@ -439,9 +439,9 @@ class PyBuildExt(build_ext):
def detect_modules(self):
# Ensure that /usr/local is always used
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+- if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ # if not cross_compiling:
++ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
-@@ -407,15 +407,15 @@ class PyBuildExt(build_ext):
+@@ -480,15 +480,15 @@ class PyBuildExt(build_ext):
for directory in reversed(options.dirs):
add_dir_to_list(dir_list, directory)
@@ -39,29 +42,13 @@ Index: Python-2.7.2/setup.py
sysconfig.get_config_var("INCLUDEDIR"))
try:
-@@ -426,11 +426,8 @@ class PyBuildExt(build_ext):
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
-- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-- ]
-- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ lib_dirs = self.compiler.library_dirs
-+ inc_dirs = self.compiler.include_dirs
- exts = []
- missing = []
-
-@@ -676,9 +673,8 @@ class PyBuildExt(build_ext):
+@@ -761,8 +761,7 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
-- 'termcap'):
+ elif self.compiler.find_library_file(lib_dirs,
-+ 'termcap'):
+ 'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
diff --git a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
new file mode 100644
index 0000000000..202aaf1069
--- /dev/null
+++ b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch
@@ -0,0 +1,86 @@
+On older versions of Python, sysconfig read the data from both the Makefile and
+the Python.h file generated at build time, created dictionaries with their variables
+and used those when using get_config_var(), now it uses _sysconfigdata.build_time_vars[]
+which contains information from the HOST, erroneous in our case, this patch reverts this
+behavior and uses Python.h and Makefile to get information.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: Python-2.7.9/Lib/distutils/sysconfig.py
+===================================================================
+--- Python-2.7.9.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.9/Lib/distutils/sysconfig.py
+@@ -401,12 +401,66 @@ _config_vars = None
+
+ def _init_posix():
+ """Initialize the module as appropriate for POSIX systems."""
+- # _sysconfigdata is generated at build time, see the sysconfig module
+- from _sysconfigdata import build_time_vars
+- global _config_vars
+- _config_vars = {}
+- _config_vars.update(build_time_vars)
++ g = {}
++ # load the installed Makefile:
++ try:
++ filename = get_makefile_filename()
++ parse_makefile(filename, g)
++ except IOError, msg:
++ my_msg = "invalid Python installation: unable to open %s" % filename
++ if hasattr(msg, "strerror"):
++ my_msg = my_msg + " (%s)" % msg.strerror
++
++ raise DistutilsPlatformError(my_msg)
++
++ # load the installed pyconfig.h:
++ try:
++ filename = get_config_h_filename()
++ parse_config_h(file(filename), g)
++ except IOError, msg:
++ my_msg = "invalid Python installation: unable to open %s" % filename
++ if hasattr(msg, "strerror"):
++ my_msg = my_msg + " (%s)" % msg.strerror
++
++ raise DistutilsPlatformError(my_msg)
++
++ # On AIX, there are wrong paths to the linker scripts in the Makefile
++ # -- these paths are relative to the Python source, but when installed
++ # the scripts are in another directory.
++ if python_build:
++ g['LDSHARED'] = g['BLDSHARED']
+
++ elif get_python_version() < '2.1':
++ # The following two branches are for 1.5.2 compatibility.
++ if sys.platform == 'aix4': # what about AIX 3.x ?
++ # Linker script is in the config directory, not in Modules as the
++ # Makefile says.
++ python_lib = get_python_lib(standard_lib=1)
++ ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
++ python_exp = os.path.join(python_lib, 'config', 'python.exp')
++
++ g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp)
++
++ elif sys.platform == 'beos':
++ # Linker script is in the config directory. In the Makefile it is
++ # relative to the srcdir, which after installation no longer makes
++ # sense.
++ python_lib = get_python_lib(standard_lib=1)
++ linkerscript_path = string.split(g['LDSHARED'])[0]
++ linkerscript_name = os.path.basename(linkerscript_path)
++ linkerscript = os.path.join(python_lib, 'config',
++ linkerscript_name)
++
++ # XXX this isn't the right place to do this: adding the Python
++ # library to the link, if needed, should be in the "build_ext"
++ # command. (It's also needed for non-MS compilers on Windows, and
++ # it's taken care of for them by the 'build_ext.get_libraries()'
++ # method.)
++ g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
++ (linkerscript, PREFIX, get_python_version()))
++
++ global _config_vars
++ _config_vars = g
+
+ def _init_nt():
+ """Initialize the module as appropriate for NT"""
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.9.bb
index e55f5feac2..34f5c2914e 100644
--- a/meta/recipes-devtools/python/python-native_2.7.3.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.9.bb
@@ -5,21 +5,19 @@ DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native s
PR = "${INC_PR}.1"
SRC_URI += "\
- file://05-enable-ctypes-cross-build.patch \
- file://06-ctypes-libffi-fix-configure.patch \
- file://10-distutils-fix-swig-parameter.patch \
- file://11-distutils-never-modify-shebang-line.patch \
- file://12-distutils-prefix-is-inside-staging-area.patch \
- file://debug.patch \
- file://unixccompiler.patch \
- file://nohostlibs.patch \
- file://multilib.patch \
- file://add-md5module-support.patch \
- file://builddir.patch \
- file://parallel-makeinst-create-bindir.patch \
- file://python-fix-build-error-with-Readline-6.3.patch \
- file://gcc-4.8-fix-configure-Wformat.patch \
- file://json-flaw-fix.patch \
+ file://05-enable-ctypes-cross-build.patch \
+ file://10-distutils-fix-swig-parameter.patch \
+ file://11-distutils-never-modify-shebang-line.patch \
+ file://12-distutils-prefix-is-inside-staging-area.patch \
+ file://debug.patch \
+ file://unixccompiler.patch \
+ file://nohostlibs.patch \
+ file://multilib.patch \
+ file://add-md5module-support.patch \
+ file://builddir.patch \
+ file://parallel-makeinst-create-bindir.patch \
+ file://revert_use_of_sysconfigdata.patch \
+ file://avoid_parallel_make_races_on_pgen.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -39,8 +37,8 @@ EXTRA_OEMAKE = '\
STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
'
-do_configure_prepend() {
- autoreconf --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
}
do_install() {
@@ -58,7 +56,7 @@ do_install() {
# (these often end up too long for the #! parser in the kernel as the
# buffer is 128 bytes long).
ln -s python-native/python ${D}${bindir}/nativepython
-
+
# We don't want modules in ~/.local being used in preference to those
# installed in the native sysroot, so disable user site support.
sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
new file mode 100644
index 0000000000..be57ac27bf
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
@@ -0,0 +1,30 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x00000007
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy/mips64n32/config.h b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
new file mode 100644
index 0000000000..c30b868f2f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
@@ -0,0 +1,139 @@
+#define HAVE_ENDIAN_H 1
+#define SIZEOF_PY_INTPTR_T 8
+#define SIZEOF_PY_LONG_LONG 8
+#define MATHLIB m
+#define HAVE_SIN 1
+#define HAVE_COS 1
+#define HAVE_TAN 1
+#define HAVE_SINH 1
+#define HAVE_COSH 1
+#define HAVE_TANH 1
+#define HAVE_FABS 1
+#define HAVE_FLOOR 1
+#define HAVE_CEIL 1
+#define HAVE_SQRT 1
+#define HAVE_LOG10 1
+#define HAVE_LOG 1
+#define HAVE_EXP 1
+#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ATAN 1
+#define HAVE_FMOD 1
+#define HAVE_MODF 1
+#define HAVE_FREXP 1
+#define HAVE_LDEXP 1
+#define HAVE_RINT 1
+#define HAVE_TRUNC 1
+#define HAVE_EXP2 1
+#define HAVE_LOG2 1
+#define HAVE_ATAN2 1
+#define HAVE_POW 1
+#define HAVE_NEXTAFTER 1
+#define HAVE_SINF 1
+#define HAVE_COSF 1
+#define HAVE_TANF 1
+#define HAVE_SINHF 1
+#define HAVE_COSHF 1
+#define HAVE_TANHF 1
+#define HAVE_FABSF 1
+#define HAVE_FLOORF 1
+#define HAVE_CEILF 1
+#define HAVE_RINTF 1
+#define HAVE_TRUNCF 1
+#define HAVE_SQRTF 1
+#define HAVE_LOG10F 1
+#define HAVE_LOGF 1
+#define HAVE_LOG1PF 1
+#define HAVE_EXPF 1
+#define HAVE_EXPM1F 1
+#define HAVE_ASINF 1
+#define HAVE_ACOSF 1
+#define HAVE_ATANF 1
+#define HAVE_ASINHF 1
+#define HAVE_ACOSHF 1
+#define HAVE_ATANHF 1
+#define HAVE_HYPOTF 1
+#define HAVE_ATAN2F 1
+#define HAVE_POWF 1
+#define HAVE_FMODF 1
+#define HAVE_MODFF 1
+#define HAVE_FREXPF 1
+#define HAVE_LDEXPF 1
+#define HAVE_EXP2F 1
+#define HAVE_LOG2F 1
+#define HAVE_COPYSIGNF 1
+#define HAVE_NEXTAFTERF 1
+#define HAVE_SINL 1
+#define HAVE_COSL 1
+#define HAVE_TANL 1
+#define HAVE_SINHL 1
+#define HAVE_COSHL 1
+#define HAVE_TANHL 1
+#define HAVE_FABSL 1
+#define HAVE_FLOORL 1
+#define HAVE_CEILL 1
+#define HAVE_RINTL 1
+#define HAVE_TRUNCL 1
+#define HAVE_SQRTL 1
+#define HAVE_LOG10L 1
+#define HAVE_LOGL 1
+#define HAVE_LOG1PL 1
+#define HAVE_EXPL 1
+#define HAVE_EXPM1L 1
+#define HAVE_ASINL 1
+#define HAVE_ACOSL 1
+#define HAVE_ATANL 1
+#define HAVE_ASINHL 1
+#define HAVE_ACOSHL 1
+#define HAVE_ATANHL 1
+#define HAVE_HYPOTL 1
+#define HAVE_ATAN2L 1
+#define HAVE_POWL 1
+#define HAVE_FMODL 1
+#define HAVE_MODFL 1
+#define HAVE_FREXPL 1
+#define HAVE_LDEXPL 1
+#define HAVE_EXP2L 1
+#define HAVE_LOG2L 1
+#define HAVE_COPYSIGNL 1
+#define HAVE_NEXTAFTERL 1
+#define HAVE_DECL_SIGNBIT
+#define HAVE_COMPLEX_H 1
+#define HAVE_CREAL 1
+#define HAVE_CIMAG 1
+#define HAVE_CABS 1
+#define HAVE_CARG 1
+#define HAVE_CEXP 1
+#define HAVE_CSQRT 1
+#define HAVE_CLOG 1
+#define HAVE_CCOS 1
+#define HAVE_CSIN 1
+#define HAVE_CPOW 1
+#define HAVE_CREALF 1
+#define HAVE_CIMAGF 1
+#define HAVE_CABSF 1
+#define HAVE_CARGF 1
+#define HAVE_CEXPF 1
+#define HAVE_CSQRTF 1
+#define HAVE_CLOGF 1
+#define HAVE_CCOSF 1
+#define HAVE_CSINF 1
+#define HAVE_CPOWF 1
+#define HAVE_CREALL 1
+#define HAVE_CIMAGL 1
+#define HAVE_CABSL 1
+#define HAVE_CARGL 1
+#define HAVE_CEXPL 1
+#define HAVE_CSQRTL 1
+#define HAVE_CLOGL 1
+#define HAVE_CCOSL 1
+#define HAVE_CSINL 1
+#define HAVE_CPOWL 1
+#define HAVE_LDOUBLE_IEEE_QUAD_LE 1
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+#ifndef _NPY_NPY_CONFIG_H_
+#error config.h should never be included directly, include npy_config.h instead
+#endif
diff --git a/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
index 6cb14c9432..d4fd279230 100644
--- a/meta/recipes-devtools/python/python-numpy_1.7.0.bb
+++ b/meta/recipes-devtools/python/python-numpy_1.7.0.bb
@@ -50,6 +50,10 @@ CONFIGFILESURI_mips64 = " \
file://config.h \
file://_numpyconfig.h \
"
+CONFIGFILESURI_mips64n32 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
S = "${WORKDIR}/numpy-${PV}"
diff --git a/meta/recipes-devtools/python/python-pexpect_3.3.bb b/meta/recipes-devtools/python/python-pexpect_3.3.bb
new file mode 100644
index 0000000000..cd80aeb2f1
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pexpect_3.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "A Pure Python Expect like Module for Python"
+HOMEPAGE = "http://pexpect.readthedocs.org/"
+SECTION = "devel/python"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c25d9a0770ba69a9965acc894e9f3644"
+
+SRC_URI = "https://pypi.python.org/packages/source/p/pexpect/pexpect-${PV}.tar.gz"
+SRC_URI[md5sum] = "0de72541d3f1374b795472fed841dce8"
+SRC_URI[sha256sum] = "dfea618d43e83cfff21504f18f98019ba520f330e4142e5185ef7c73527de5ba"
+
+S = "${WORKDIR}/pexpect-${PV}"
+
+inherit distutils
+
+RDEPENDS_${PN} = "\
+ python-core \
+ python-io \
+ python-terminal \
+ python-resource \
+ python-fcntl \
+"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.3.1.bb b/meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb
index 02d0ae9be0..0d0effef60 100644
--- a/meta/recipes-devtools/python/python-pycurl_7.19.3.1.bb
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb
@@ -2,7 +2,7 @@ SUMMARY = "Python bindings for libcurl"
HOMEPAGE = "http://pycurl.sourceforge.net/"
SECTION = "devel/python"
LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=148;endline=163;md5=57e5ab0c0f964533fc59d93dec5695bb \
+LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=181;md5=57e5ab0c0f964533fc59d93dec5695bb \
file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
file://COPYING-MIT;md5=e8200955c773b2a0fd6cea36ea5e87be"
@@ -15,8 +15,8 @@ SRC_URI = "\
file://no-static-link.patch \
"
-SRC_URI[archive.md5sum] = "6df8fa7fe8b680d93248da1f8d4fcd12"
-SRC_URI[archive.sha256sum] = "c0d673fe99a9de07239eabe77c798f1b043f60c02afaec1430ceaf59d7501a4f"
+SRC_URI[archive.md5sum] = "f44cd54256d7a643ab7b16e3f409b26b"
+SRC_URI[archive.sha256sum] = "6e9770f80459757f73bd71af82fbb29cd398b38388cdf1beab31ea91a331bc6c"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils
@@ -29,6 +29,11 @@ export STAGING_LIBDIR
BBCLASSEXTEND = "native"
+# Ensure the docstrings are generated as make clean will remove them
+do_compile_prepend() {
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
+}
+
do_install_append() {
rm -rf ${D}${datadir}/share
}
diff --git a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
index 45a0603eb7..f4359bb257 100644
--- a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
+++ b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
@@ -12,14 +12,25 @@ SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
file://obsolete_automake_macros.patch \
"
+# libtool-native doesn't have fixinstall.patch applied which means
+# that libs get relinked at installation time. This triggers a
+# relinking along the lines of:
+# gcc -L/tmp/foo/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/lib -lpyglib-2.0-python -o .libs/_glib.so
+# where /tmp/foo is DESTDIR and pyglib-2.0-python may be installed/reinstalled
+# at the same time as the gcc command runs.
+# If this happens between the handoff between gcc and ld, you can see:
+# /bin/ld: cannot find -lpyglib-2.0-python
+# Adding a dependency rule like install-pyglibLTLIBRARIES: install-libLTLIBRARIES
+# would be ideal but automake can't cope with that without manually
+# defining the whole function. Give up and disable parallel make in native builds.
+PARALLEL_MAKEINST_class-native = ""
+
SRC_URI[md5sum] = "aa64900b274c4661a5c32e52922977f9"
SRC_URI[sha256sum] = "7da88c169a56efccc516cebd9237da3fe518a343095a664607b368fe21df95b6"
S = "${WORKDIR}/pygobject-${PV}"
EXTRA_OECONF += "--disable-introspection"
-PARALLEL_MAKEINST = ""
-
inherit autotools distutils-base pkgconfig
# necessary to let the call for python-config succeed
diff --git a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
index ff84be2bbc..053f37fcbe 100644
--- a/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
+++ b/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
@@ -49,7 +49,7 @@ do_install_append() {
for i in `find ${D} -name "*.la"` ; do \
sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
done
-
+
if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
diff --git a/meta/recipes-devtools/python/python-scons-native_2.3.2.bb b/meta/recipes-devtools/python/python-scons-native_2.3.4.bb
index dae89ab5d2..dae89ab5d2 100644
--- a/meta/recipes-devtools/python/python-scons-native_2.3.2.bb
+++ b/meta/recipes-devtools/python/python-scons-native_2.3.4.bb
diff --git a/meta/recipes-devtools/python/python-scons_2.3.2.bb b/meta/recipes-devtools/python/python-scons_2.3.4.bb
index fc5b302aae..9b828fac9d 100644
--- a/meta/recipes-devtools/python/python-scons_2.3.2.bb
+++ b/meta/recipes-devtools/python/python-scons_2.3.4.bb
@@ -6,8 +6,8 @@ SRCNAME = "scons"
SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-SRC_URI[md5sum] = "bbd428da35ec176575a2b0be1f8d7162"
-SRC_URI[sha256sum] = "f993320c5e9515e6567fcce73df0a7a8808414bf1223c69123d3dcf339a449d4"
+SRC_URI[md5sum] = "91fbbb67c2c65b03c746601baac4a6a5"
+SRC_URI[sha256sum] = "4b57d72066fed3b6ff65a7dd9f73633c9b1c09f87520e9b3aae84b3e4864b441"
S = "${WORKDIR}/${SRCNAME}-${PV}"
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
new file mode 100644
index 0000000000..8a27f2583a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
@@ -0,0 +1,37 @@
+python-smartpm: Add checking for "rpm-ignoresize" option
+
+The do_rootfs takes a very long time when build host has mounted many NFS
+devices. syscall lstat() was being called on every filesystem mounted on the
+build host during building.
+The reason for the lstat() is that rpm is verifying that enough free disk space
+is available to do the install. However, since the install is into the target
+rootfs it should not matter how much free space there is in the host mounts.
+Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip
+checking for diskspace when install a rpm package.
+
+Upstream-Status: Pending
+
+Signed-off-by: wenlin.kang <wenlin.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ smart/backends/rpm/pm.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 5da9ee6..f0488ec 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -241,6 +241,10 @@ class RPMPackageManager(PackageManager):
+ except AttributeError:
+ probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
+
++ if sysconf.get("rpm-ignoresize", False):
++ probfilter |= rpm.RPMPROB_FILTER_DISKNODES
++ probfilter |= rpm.RPMPROB_FILTER_DISKSPACE
++
+ if force or reinstall:
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
+ probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
index f2eb33d3a3..c75f10fbf3 100644
--- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
+++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb
@@ -33,6 +33,7 @@ SRC_URI = "\
file://smart-attempt.patch \
file://smart-filename-NAME_MAX.patch \
file://smart-rpm4-fixes.patch \
+ file://smart-add-for-rpm-ignoresize-check.patch \
"
SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc
index 19942baeb0..e18ab8e99a 100644
--- a/meta/recipes-devtools/python/python.inc
+++ b/meta/recipes-devtools/python/python.inc
@@ -3,18 +3,18 @@ HOMEPAGE = "http://www.python.org"
LICENSE = "PSFv2"
SECTION = "devel/python"
# bump this on every change in contrib/python/generate-manifest-2.7.py
-INC_PR = "r0"
+INC_PR = "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=dff3d00f049545862992d2d097831a13"
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "c57477edd6d18bd9eeca2f21add73919"
-SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c"
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "38d530f7efc373d64a8fb1637e3baaa7"
+SRC_URI[sha256sum] = "90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916"
PYTHON_MAJMIN = "2.7"
-inherit autotools-brokensep
+inherit autotools
PYTHONLSBOPTS = "--with-wctype-functions"
PYTHONLSBOPTS_linuxstdbase = "ac_cv_sizeof_off_t=8"
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index 691beada03..1257ca6557 100644
--- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -1,102 +1,83 @@
+We need to ensure our host tools get run during build, not the freshly
+built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
+
Upstream-Status: Inappropriate [embedded specific]
-# We need to ensure our host tools get run during build, not the freshly
-# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Rebased for python-2.7.9
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-2.7.2/Makefile.pre.in
+Index: Python-2.7.9/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
-
- PYTHON= python$(EXE)
- BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON= $(BUILDPYTHON)
-
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -234,6 +234,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
--
+HOSTPGEN= $(PGEN)$(EXE)
- POBJS= \
- Parser/acceler.o \
- Parser/grammar1.o \
-@@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
- $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-
- platform: $(BUILDPYTHON)
-- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
-+ $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+ PSRCS= \
+ Parser/acceler.c \
+@@ -445,7 +446,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
- esac
+ platform: $(BUILDPYTHON) pybuilddir.txt
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
++ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
- # Build static library
-@@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
- Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
+ # Create build directory and generate the sysconfig build-time data there.
+ # pybuilddir.txt contains the name of the build dir and is used for
+@@ -611,7 +612,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ @$(MKDIR_P) Include
+ $(MAKE) $(PGEN)
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- -touch Parser/pgen.stamp
-
- $(PGEN): $(PGENOBJS)
-@@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL
- done
- $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+ $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
+@@ -1043,27 +1044,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
+- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
++ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
++ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
-@@ -1049,7 +1050,7 @@ libainstall: all python-config
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.9/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -313,6 +313,7 @@ class PyBuildExt(build_ext):
+--- Python-2.7.9.orig/setup.py
++++ Python-2.7.9/setup.py
+@@ -334,6 +334,7 @@ class PyBuildExt(build_ext):
self.failed.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
@@ -104,18 +85,7 @@ Index: Python-2.7.2/setup.py
assert not self.inplace
basename, tail = os.path.splitext(ext_filename)
newname = basename + "_failed" + tail
-@@ -369,8 +370,8 @@ class PyBuildExt(build_ext):
-
- def detect_modules(self):
- # Ensure that /usr/local is always used
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
-@@ -475,6 +476,9 @@ class PyBuildExt(build_ext):
+@@ -558,6 +559,9 @@ class PyBuildExt(build_ext):
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -125,14 +95,3 @@ Index: Python-2.7.2/setup.py
#
# The following modules are all pretty straightforward, and compile
# on pretty much any POSIXish platform.
-@@ -677,8 +681,8 @@ class PyBuildExt(build_ext):
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-- 'termcap'):
-+ ['/usr/lib/termcap'],
-+ 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
diff --git a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
index d74e4b1776..650ceb5951 100644
--- a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
+++ b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch
@@ -1,14 +1,18 @@
Upstream-Status: Inappropriate [embedded specific]
-# We need to supply STAGING_INCDIR here, otherwise the Tk headers
-# will not be found.
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de>
+We need to supply STAGING_INCDIR here, otherwise the Tk headers
+will not be found.
-Index: Python-2.6.1/setup.py
-===================================================================
---- Python-2.6.1.orig/setup.py
-+++ Python-2.6.1/setup.py
-@@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext):
+Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille.de>
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+Rebased for python-2.7.9
+
+diff --git a/setup.py b/setup.py
+index 8fe1fb8..67eda74 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext):
dotversion = dotversion[:-1] + '.' + dotversion[-1]
tcl_include_sub = []
tk_include_sub = []
@@ -17,12 +21,12 @@ Index: Python-2.6.1/setup.py
tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
tk_include_sub += [dir + os.sep + "tk" + dotversion]
tk_include_sub += tcl_include_sub
-@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext):
+@@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext):
if dir not in include_dirs:
include_dirs.append(dir)
- # Check for various platform-specific directories
-- if platform == 'sunos5':
+- if host_platform == 'sunos5':
- include_dirs.append('/usr/openwin/include')
- added_lib_dirs.append('/usr/openwin/lib')
- elif os.path.exists('/usr/X11R6/include'):
@@ -38,5 +42,5 @@ Index: Python-2.6.1/setup.py
- added_lib_dirs.append('/usr/X11/lib')
-
# If Cygwin, then verify that X is installed before proceeding
- if platform == 'cygwin':
+ if host_platform == 'cygwin':
x11_inc = find_file('X11/Xlib.h', [], include_dirs)
diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
index a68a20620a..5cc8742462 100644
--- a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
+++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch
@@ -1,25 +1,22 @@
+Rebased for python 2.7.9
+
Upstream-Status: Inappropriate [embedded specific]
# CTypes need to know the actual host we are building on.
# Signed-Off: Michael Dietrich <mdt@emdete.de>
-Index: Python-2.6.1/setup.py
+Index: Python-2.7.9/setup.py
===================================================================
---- Python-2.6.1.orig/setup.py
-+++ Python-2.6.1/setup.py
-@@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext):
- ffi_configfile):
- from distutils.dir_util import mkpath
- mkpath(ffi_builddir)
-- config_args = []
-+ config_args = ['--host=%s' % os.environ["HOST_SYS"], ]
+--- Python-2.7.9.orig/setup.py
++++ Python-2.7.9/setup.py
+@@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext):
# Pass empty CFLAGS because we'll just append the resulting
# CFLAGS to Python's; -g or -O2 is to be avoided.
- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
- % (ffi_builddir, ffi_srcdir, " ".join(config_args))
+ cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \
-+ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
++ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args))
res = os.system(cmd)
if res or not os.path.exists(ffi_configfile):
diff --git a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
index f8ab0e71e9..e452cb6ac4 100644
--- a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
+++ b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
@@ -13,18 +13,20 @@ Nitin A Kamble <nitin.a.kamble@intel.com>
Rebased for python 2.7.2
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -680,12 +680,10 @@ class PyBuildExt(build_ext):
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/setup.py b/setup.py
+index 67eda74..59c537e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -761,12 +761,10 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
+- ['/usr/lib/termcap'],
+ elif self.compiler.find_library_file(lib_dirs,
- 'termcap'):
+ 'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
diff --git a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch b/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch
deleted file mode 100644
index abd63d2a96..0000000000
--- a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-This fixes configure issues with recent autoconf, e.g:
- autoreconf: Entering directory `Modules/_ctypes/libffi'
- autoreconf: configure.ac: not using Gettext
- autoreconf: running: aclocal --force
- configure.ac:26: error: m4_copy: won't overwrite defined macro: _AC_ARG_VAR_PRECIOUS
- configure.ac:26: the top level
-
-The problem is still present in python-2.6.5 but fixed in python-svn.
-
-Upstream-Status: Accepted [python-svn]
-
-Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
-Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-2011/09/29
-Rebased for python 2.7.2
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-
-Index: Python-2.7.2/Modules/_ctypes/libffi/Makefile.am
-===================================================================
---- Python-2.7.2.orig/Modules/_ctypes/libffi/Makefile.am
-+++ Python-2.7.2/Modules/_ctypes/libffi/Makefile.am
-@@ -2,7 +2,7 @@
-
- AUTOMAKE_OPTIONS = foreign subdir-objects
-
--SUBDIRS = include testsuite man
-+SUBDIRS = include
-
- EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
- src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
-@@ -34,8 +34,6 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
- libtool-version ChangeLog.libffi m4/libtool.m4 \
- m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
-
--info_TEXINFOS = doc/libffi.texi
--
- ## ################################################################
-
- ##
diff --git a/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch b/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch
deleted file mode 100644
index 0d17463052..0000000000
--- a/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch
+++ /dev/null
@@ -1,251 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-diff -r 9ddc63c039ba Lib/test/nullbytecert.pem
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:13:17 2013 +0200
-@@ -0,0 +1,90 @@
-+Certificate:
-+ Data:
-+ Version: 3 (0x2)
-+ Serial Number: 0 (0x0)
-+ Signature Algorithm: sha1WithRSAEncryption
-+ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+ Validity
-+ Not Before: Aug 7 13:11:52 2013 GMT
-+ Not After : Aug 7 13:12:52 2013 GMT
-+ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+ Subject Public Key Info:
-+ Public Key Algorithm: rsaEncryption
-+ Public-Key: (2048 bit)
-+ Modulus:
-+ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
-+ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
-+ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
-+ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
-+ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
-+ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
-+ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
-+ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
-+ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
-+ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
-+ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
-+ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
-+ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
-+ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
-+ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
-+ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
-+ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
-+ 2f:85
-+ Exponent: 65537 (0x10001)
-+ X509v3 extensions:
-+ X509v3 Basic Constraints: critical
-+ CA:FALSE
-+ X509v3 Subject Key Identifier:
-+ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
-+ X509v3 Key Usage:
-+ Digital Signature, Non Repudiation, Key Encipherment
-+ X509v3 Subject Alternative Name:
-+ *************************************************************
-+ WARNING: The values for DNS, email and URI are WRONG. OpenSSL
-+ doesn't print the text after a NULL byte.
-+ *************************************************************
-+ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
-+ Signature Algorithm: sha1WithRSAEncryption
-+ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
-+ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
-+ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
-+ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
-+ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
-+ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
-+ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
-+ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
-+ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
-+ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
-+ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
-+ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
-+ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
-+ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
-+ c1:ca:a9:94
-+-----BEGIN CERTIFICATE-----
-+MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
-+DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
-+eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
-+RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
-+ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
-+NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
-+DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
-+ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
-+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
-+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
-+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
-+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
-+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
-+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
-+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
-+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
-+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
-+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
-+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
-+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
-+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
-+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
-+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
-+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
-+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
-+RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
-+-----END CERTIFICATE-----
-diff -r 9ddc63c039ba Lib/test/test_ssl.py
---- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300
-+++ b/Lib/test/test_ssl.py Sun Aug 11 18:13:17 2013 +0200
-@@ -25,6 +25,7 @@
- HOST = test_support.HOST
- CERTFILE = None
- SVN_PYTHON_ORG_ROOT_CERT = None
-+NULLBYTECERT = None
-
- def handle_error(prefix):
- exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
-@@ -123,6 +124,27 @@
- ('DNS', 'projects.forum.nokia.com'))
- )
-
-+ def test_parse_cert_CVE_2013_4073(self):
-+ p = ssl._ssl._test_decode_cert(NULLBYTECERT)
-+ if test_support.verbose:
-+ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
-+ subject = ((('countryName', 'US'),),
-+ (('stateOrProvinceName', 'Oregon'),),
-+ (('localityName', 'Beaverton'),),
-+ (('organizationName', 'Python Software Foundation'),),
-+ (('organizationalUnitName', 'Python Core Development'),),
-+ (('commonName', 'null.python.org\x00example.org'),),
-+ (('emailAddress', 'python-dev@python.org'),))
-+ self.assertEqual(p['subject'], subject)
-+ self.assertEqual(p['issuer'], subject)
-+ self.assertEqual(p['subjectAltName'],
-+ (('DNS', 'altnull.python.org\x00example.com'),
-+ ('email', 'null@python.org\x00user@example.org'),
-+ ('URI', 'http://null.python.org\x00http://example.org'),
-+ ('IP Address', '192.0.2.1'),
-+ ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
-+ )
-+
- def test_DER_to_PEM(self):
- with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
- pem = f.read()
-@@ -1360,7 +1382,7 @@
-
-
- def test_main(verbose=False):
-- global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT
-+ global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT
- CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
- "keycert.pem")
- SVN_PYTHON_ORG_ROOT_CERT = os.path.join(
-@@ -1368,10 +1390,13 @@
- "https_svn_python_org_root.pem")
- NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir,
- "nokia.pem")
-+ NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir,
-+ "nullbytecert.pem")
-
- if (not os.path.exists(CERTFILE) or
- not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or
-- not os.path.exists(NOKIACERT)):
-+ not os.path.exists(NOKIACERT) or
-+ not os.path.exists(NULLBYTECERT)):
- raise test_support.TestFailed("Can't read certificate files!")
-
- tests = [BasicTests, BasicSocketTests]
-diff -r 9ddc63c039ba Modules/_ssl.c
---- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300
-+++ b/Modules/_ssl.c Sun Aug 11 18:13:17 2013 +0200
-@@ -741,8 +741,13 @@
-
- /* get a rendering of each name in the set of names */
-
-+ int gntype;
-+ ASN1_STRING *as = NULL;
-+
- name = sk_GENERAL_NAME_value(names, j);
-- if (name->type == GEN_DIRNAME) {
-+ gntype = name-> type;
-+ switch (gntype) {
-+ case GEN_DIRNAME:
-
- /* we special-case DirName as a tuple of tuples of attributes */
-
-@@ -764,11 +769,61 @@
- goto fail;
- }
- PyTuple_SET_ITEM(t, 1, v);
-+ break;
-
-- } else {
-+ case GEN_EMAIL:
-+ case GEN_DNS:
-+ case GEN_URI:
-+ /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
-+ correctly. */
-+ t = PyTuple_New(2);
-+ if (t == NULL)
-+ goto fail;
-+ switch (gntype) {
-+ case GEN_EMAIL:
-+ v = PyUnicode_FromString("email");
-+ as = name->d.rfc822Name;
-+ break;
-+ case GEN_DNS:
-+ v = PyUnicode_FromString("DNS");
-+ as = name->d.dNSName;
-+ break;
-+ case GEN_URI:
-+ v = PyUnicode_FromString("URI");
-+ as = name->d.uniformResourceIdentifier;
-+ break;
-+ }
-+ if (v == NULL) {
-+ Py_DECREF(t);
-+ goto fail;
-+ }
-+ PyTuple_SET_ITEM(t, 0, v);
-+ v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as),
-+ ASN1_STRING_length(as));
-+ if (v == NULL) {
-+ Py_DECREF(t);
-+ goto fail;
-+ }
-+ PyTuple_SET_ITEM(t, 1, v);
-+ break;
-
-+ default:
- /* for everything else, we use the OpenSSL print form */
--
-+ switch (gntype) {
-+ /* check for new general name type */
-+ case GEN_OTHERNAME:
-+ case GEN_X400:
-+ case GEN_EDIPARTY:
-+ case GEN_IPADD:
-+ case GEN_RID:
-+ break;
-+ default:
-+ if (PyErr_Warn(PyExc_RuntimeWarning,
-+ "Unknown general name type") == -1) {
-+ goto fail;
-+ }
-+ break;
-+ }
- (void) BIO_reset(biobuf);
- GENERAL_NAME_print(biobuf, name);
- len = BIO_gets(biobuf, buf, sizeof(buf)-1);
-@@ -794,6 +849,7 @@
- goto fail;
- }
- PyTuple_SET_ITEM(t, 1, v);
-+ break;
- }
-
- /* and add that rendering to the list */
diff --git a/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch b/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
new file mode 100644
index 0000000000..e9bae324f7
--- /dev/null
+++ b/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Pending
+
+Avoids parallel make races linking errors when making Parser/PGEN
+
+- Implements Richard Purdie's idea
+
+Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: Python-2.7.9/Makefile.pre.in
+===================================================================
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -611,12 +611,10 @@ Modules/grpmodule.o: $(srcdir)/Modules/g
+
+ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
+
+-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
++$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
+ @$(MKDIR_P) Include
+- $(MAKE) $(PGEN)
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+- $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
+
+ $(PGEN): $(PGENOBJS)
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index bedc3909d8..208c57c822 100644
--- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -2,22 +2,17 @@ _tkinter module needs tk module along with tcl. tk is not yet integrated
in yocto so we skip the check for this module.
Avoid a warning by not adding this module to missing variable.
-Also simply disable the tk module since its not in DEPENDS.
-
Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.3/setup.py
+Index: Python-2.7.2/setup.py
===================================================================
---- Python-2.7.3.orig/setup.py 2014-07-07 13:45:15.056233820 +0000
-+++ Python-2.7.3/setup.py 2014-07-16 16:06:37.145656284 +0000
-@@ -1639,10 +1639,12 @@
- self.extensions.extend(exts)
-
+--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300
++++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300
+@@ -1634,8 +1634,10 @@
# Call the method for detecting whether _tkinter can be compiled
-- self.detect_tkinter(inc_dirs, lib_dirs)
-+ #self.detect_tkinter(inc_dirs, lib_dirs)
+ self.detect_tkinter(inc_dirs, lib_dirs)
- if '_tkinter' not in [e.name for e in self.extensions]:
- missing.append('_tkinter')
diff --git a/meta/recipes-devtools/python/python/builddir.patch b/meta/recipes-devtools/python/python/builddir.patch
index 930170b95a..ad629a022e 100644
--- a/meta/recipes-devtools/python/python/builddir.patch
+++ b/meta/recipes-devtools/python/python/builddir.patch
@@ -7,11 +7,11 @@ python recipe.
Upstream-Status: Inappropriate
RP 2012/11/13
-Index: Python-2.7.3/Lib/sysconfig.py
+Index: Python-2.7.9/Lib/sysconfig.py
===================================================================
---- Python-2.7.3.orig/Lib/sysconfig.py 2012-11-13 14:36:08.429167199 +0000
-+++ Python-2.7.3/Lib/sysconfig.py 2012-11-13 21:58:31.788551800 +0000
-@@ -93,6 +93,7 @@
+--- Python-2.7.9.orig/Lib/sysconfig.py
++++ Python-2.7.9/Lib/sysconfig.py
+@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix)
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
_CONFIG_VARS = None
_USER_BASE = None
@@ -19,7 +19,7 @@ Index: Python-2.7.3/Lib/sysconfig.py
def _safe_realpath(path):
try:
-@@ -100,7 +102,9 @@
+@@ -100,7 +101,9 @@ def _safe_realpath(path):
except OSError:
return path
@@ -30,11 +30,11 @@ Index: Python-2.7.3/Lib/sysconfig.py
_PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
else:
# sys.executable can be empty if argv[0] has been changed and Python is
-Index: Python-2.7.3/Lib/distutils/sysconfig.py
+Index: Python-2.7.9/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.3.orig/Lib/distutils/sysconfig.py 2012-11-13 14:36:08.005167209 +0000
-+++ Python-2.7.3/Lib/distutils/sysconfig.py 2012-11-13 22:07:05.644540695 +0000
-@@ -26,6 +26,9 @@
+--- Python-2.7.9.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.9/Lib/distutils/sysconfig.py
+@@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
# it'll live in project/PCbuild/amd64.
project_base = os.path.dirname(os.path.abspath(sys.executable))
@@ -44,12 +44,3 @@ Index: Python-2.7.3/Lib/distutils/sysconfig.py
if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
# PC/VS7.1
-@@ -247,7 +250,7 @@
- def get_makefile_filename():
- """Return full pathname of installed Makefile from the Python build."""
- if python_build:
-- return os.path.join(os.path.dirname(sys.executable), "Makefile")
-+ return os.path.join(project_base, "Makefile")
- lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
- return os.path.join(lib_dir, "config", "Makefile")
-
diff --git a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
index 50d3915425..e4262d9ef0 100644
--- a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
+++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
@@ -11,72 +11,67 @@ Updated for python 2.7.3
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: 2012/05/01
-Index: Python-2.7.3/Lib/sysconfig.py
+Rebased for python-2.7.9
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+
+Index: Python-2.7.9/Lib/sysconfig.py
===================================================================
---- Python-2.7.3.orig/Lib/sysconfig.py
-+++ Python-2.7.3/Lib/sysconfig.py
-@@ -7,10 +7,10 @@ from os.path import pardir, realpath
-
- _INSTALL_SCHEMES = {
+--- Python-2.7.9.orig/Lib/sysconfig.py
++++ Python-2.7.9/Lib/sysconfig.py
+@@ -9,7 +9,7 @@ _INSTALL_SCHEMES = {
'posix_prefix': {
-- 'stdlib': '{base}/lib/python{py_version_short}',
-- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
-+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages',
-+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{base}/include/python{py_version_short}',
'platinclude': '{platbase}/include/python{py_version_short}',
- 'scripts': '{base}/bin',
-@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
- 'data' : '{userbase}',
- },
+@@ -67,7 +67,7 @@ _INSTALL_SCHEMES = {
'posix_user': {
-- 'stdlib': '{userbase}/lib/python{py_version_short}',
-- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
-+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
-+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
- 'data' : '{userbase}',
-Index: Python-2.7.3/Makefile.pre.in
+Index: Python-2.7.9/Makefile.pre.in
===================================================================
---- Python-2.7.3.orig/Makefile.pre.in
-+++ Python-2.7.3/Makefile.pre.in
-@@ -941,25 +941,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -1046,27 +1046,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH}$(RUNSHARED) \
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
- $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \
+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
# Create the PLATDIR source directory, if one wasn't distributed..
diff --git a/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch b/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch
deleted file mode 100644
index b5d9d5d424..0000000000
--- a/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-backport bug 17547 from http://hg.python.org/cpython/rev/9d50af4c482f/
-
--Wformat is needed by gcc 4.8
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Backport
-Index: Python-2.7.3/configure.in
-===================================================================
---- Python-2.7.3.orig/configure.in 2013-06-11 02:22:04.186529212 -0700
-+++ Python-2.7.3/configure.in 2013-06-13 02:17:06.324403327 -0700
-@@ -1196,7 +1196,7 @@
- then
- AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
- save_CFLAGS=$CFLAGS
-- CFLAGS="$CFLAGS -Werror"
-+ CFLAGS="$CFLAGS -Werror -Wformat"
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
- ],[
diff --git a/meta/recipes-devtools/python/python/host_include_contamination.patch b/meta/recipes-devtools/python/python/host_include_contamination.patch
index 62cb8b16da..e0aafb218b 100644
--- a/meta/recipes-devtools/python/python/host_include_contamination.patch
+++ b/meta/recipes-devtools/python/python/host_include_contamination.patch
@@ -12,16 +12,17 @@ so we add a check here.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py 2012-02-03 12:10:42.307057756 -0800
-+++ Python-2.7.2/setup.py 2012-02-03 12:11:12.363059210 -0800
-@@ -360,6 +360,8 @@
- # https://wiki.ubuntu.com/MultiarchSpec
+
+diff --git a/setup.py b/setup.py
+index ba2d242..bf859be 100644
+--- a/setup.py
++++ b/setup.py
+@@ -393,6 +393,8 @@ class PyBuildExt(build_ext):
+
if not find_executable('dpkg-architecture'):
return
-+ if os.environ.get('CROSS_COMPILE') is not None:
-+ return
- tmpfile = os.path.join(self.build_temp, 'multiarch')
- if not os.path.exists(self.build_temp):
- os.makedirs(self.build_temp)
++ if os.environ.get('CROSS_COMPILE') is not None:
++ return
+ opt = ''
+ if cross_compiling:
+ opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
diff --git a/meta/recipes-devtools/python/python/json-flaw-fix.patch b/meta/recipes-devtools/python/python/json-flaw-fix.patch
deleted file mode 100644
index e9a6cca017..0000000000
--- a/meta/recipes-devtools/python/python/json-flaw-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-
-python: fix _json module arbitrary process memory read vulnerability
-
-Upstream-Status: submitted
-
-Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com>
-
---- a/Modules/_json.c 2014-07-15 15:37:17.151046356 +0200
-+++ b/Modules/_json.c 2014-07-15 15:38:37.335605042 +0200
-@@ -1491,7 +1491,7 @@ scan_once_str(PyScannerObject *s, PyObje
- PyObject *res;
- char *str = PyString_AS_STRING(pystr);
- Py_ssize_t length = PyString_GET_SIZE(pystr);
-- if (idx >= length) {
-+ if ( idx < 0 || idx >= length) {
- PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
-@@ -1578,7 +1578,7 @@ scan_once_unicode(PyScannerObject *s, Py
- PyObject *res;
- Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
- Py_ssize_t length = PyUnicode_GET_SIZE(pystr);
-- if (idx >= length) {
-+ if ( idx < 0 || idx >= length) {
- PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch
index df470f7c09..0bfa0d2cf4 100644
--- a/meta/recipes-devtools/python/python/multilib.patch
+++ b/meta/recipes-devtools/python/python/multilib.patch
@@ -1,26 +1,25 @@
-commit 248279e54467a8cd5cde98fc124d1d1384703513
-Author: Yu Ke <ke.yu@intel.com>
-Date: Tue Jun 28 21:21:29 2011 +0800
+Rebased for python-2.7.9
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
- SUSE patch for the lib64 issue
-
- see detail in http://bugs.python.org/issue1294959
-
- also rebased a bit for Yocto python 2.6.6
-
- Picked-by: Yu Ke <ke.yu@intel.com>
-
-2011/09/29
-Rebased for python 2.7.2
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: Python-2.7.2/Include/pythonrun.h
+Index: Python-2.7.9/configure.ac
===================================================================
---- Python-2.7.2.orig/Include/pythonrun.h
-+++ Python-2.7.2/Include/pythonrun.h
+--- Python-2.7.9.orig/configure.ac
++++ Python-2.7.9/configure.ac
+@@ -736,6 +736,10 @@ SunOS*)
+ ;;
+ esac
+
++AC_SUBST(LIB)
++AC_MSG_CHECKING(LIB)
++LIB=`basename ${libdir}`
++AC_MSG_RESULT($LIB)
+
+ AC_SUBST(LIBRARY)
+ AC_MSG_CHECKING(LIBRARY)
+Index: Python-2.7.9/Include/pythonrun.h
+===================================================================
+--- Python-2.7.9.orig/Include/pythonrun.h
++++ Python-2.7.9/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -29,10 +28,10 @@ Index: Python-2.7.2/Include/pythonrun.h
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.2/Lib/distutils/command/install.py
+Index: Python-2.7.9/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.2.orig/Lib/distutils/command/install.py
-+++ Python-2.7.2/Lib/distutils/command/install.py
+--- Python-2.7.9.orig/Lib/distutils/command/install.py
++++ Python-2.7.9/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -51,11 +50,11 @@ Index: Python-2.7.2/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.2/Lib/distutils/sysconfig.py
+Index: Python-2.7.9/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.2.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.2/Lib/distutils/sysconfig.py
-@@ -114,8 +114,11 @@ def get_python_lib(plat_specific=0, stan
+--- Python-2.7.9.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.9/Lib/distutils/sysconfig.py
+@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
@@ -69,11 +68,11 @@ Index: Python-2.7.2/Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-Index: Python-2.7.2/Lib/pydoc.py
+Index: Python-2.7.9/Lib/pydoc.py
===================================================================
---- Python-2.7.2.orig/Lib/pydoc.py
-+++ Python-2.7.2/Lib/pydoc.py
-@@ -352,7 +352,7 @@ class Doc:
+--- Python-2.7.9.orig/Lib/pydoc.py
++++ Python-2.7.9/Lib/pydoc.py
+@@ -383,7 +383,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
@@ -82,11 +81,11 @@ Index: Python-2.7.2/Lib/pydoc.py
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.2/Lib/site.py
+Index: Python-2.7.9/Lib/site.py
===================================================================
---- Python-2.7.2.orig/Lib/site.py
-+++ Python-2.7.2/Lib/site.py
-@@ -300,13 +300,19 @@ def getsitepackages():
+--- Python-2.7.9.orig/Lib/site.py
++++ Python-2.7.9/Lib/site.py
+@@ -288,13 +288,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
@@ -95,12 +94,11 @@ Index: Python-2.7.2/Lib/site.py
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ if sys.lib != "lib":
-+ sitepackages.append(os.path.join(prefix, "lib",
-+ "python" + sys.version[:3],
-+ "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+ if sys.lib != "lib":
++ sitepackages.append(os.path.join(prefix, "lib",
++ "python" + sys.version[:3],
++ "site-packages"))
+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
@@ -109,11 +107,43 @@ Index: Python-2.7.2/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-Index: Python-2.7.2/Lib/test/test_dl.py
+Index: Python-2.7.9/Lib/sysconfig.py
+===================================================================
+--- Python-2.7.9.orig/Lib/sysconfig.py
++++ Python-2.7.9/Lib/sysconfig.py
+@@ -7,10 +7,10 @@ from os.path import pardir, realpath
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{base}/lib/python{py_version_short}',
+- 'platstdlib': '{platbase}/lib/python{py_version_short}',
++ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
++ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include': '{base}/include/python{py_version_short}',
+ 'platinclude': '{platbase}/include/python{py_version_short}',
+ 'scripts': '{base}/bin',
+@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
+ 'data' : '{userbase}',
+ },
+ 'posix_user': {
+- 'stdlib': '{userbase}/lib/python{py_version_short}',
+- 'platstdlib': '{userbase}/lib/python{py_version_short}',
++ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
++ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+ 'data' : '{userbase}',
+Index: Python-2.7.9/Lib/test/test_dl.py
===================================================================
---- Python-2.7.2.orig/Lib/test/test_dl.py
-+++ Python-2.7.2/Lib/test/test_dl.py
-@@ -5,10 +5,11 @@
+--- Python-2.7.9.orig/Lib/test/test_dl.py
++++ Python-2.7.9/Lib/test/test_dl.py
+@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
dl = import_module('dl', deprecated=True)
@@ -127,11 +157,35 @@ Index: Python-2.7.2/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.2/Lib/trace.py
+Index: Python-2.7.9/Lib/test/test_site.py
===================================================================
---- Python-2.7.2.orig/Lib/trace.py
-+++ Python-2.7.2/Lib/trace.py
-@@ -762,10 +762,10 @@ def main(argv=None):
+--- Python-2.7.9.orig/Lib/test/test_site.py
++++ Python-2.7.9/Lib/test/test_site.py
+@@ -241,12 +241,16 @@ class HelperFunctionsTests(unittest.Test
+ self.assertEqual(dirs[2], wanted)
+ elif os.sep == '/':
+ # OS X non-framwework builds, Linux, FreeBSD, etc
+- self.assertEqual(len(dirs), 2)
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
+ 'site-packages')
+- self.assertEqual(dirs[0], wanted)
++ self.assertTrue(wanted in dirs)
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
+- self.assertEqual(dirs[1], wanted)
++ self.assertTrue(wanted in dirs)
++ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
++ 'site-packages')
++ self.assertTrue(wanted in dirs)
++ wanted = os.path.join('xoxo', sys.lib, 'site-python')
++ self.assertTrue(wanted in dirs)
+ else:
+ # other platforms
+ self.assertEqual(len(dirs), 2)
+Index: Python-2.7.9/Lib/trace.py
+===================================================================
+--- Python-2.7.9.orig/Lib/trace.py
++++ Python-2.7.9/Lib/trace.py
+@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
@@ -144,19 +198,19 @@ Index: Python-2.7.2/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.2/Makefile.pre.in
+Index: Python-2.7.9/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.9.orig/Makefile.pre.in
++++ Python-2.7.9/Makefile.pre.in
+@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
- # Install prefix for architecture-independent files
- prefix= @prefix@
-@@ -97,7 +98,7 @@ LIBDIR= @libdir@
+ # Multiarch directory (may be empty)
+ MULTIARCH= @MULTIARCH@
+@@ -106,7 +107,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -165,7 +219,7 @@ Index: Python-2.7.2/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -533,6 +534,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -598,6 +599,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -173,7 +227,7 @@ Index: Python-2.7.2/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -567,7 +569,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
+@@ -640,7 +642,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -182,10 +236,10 @@ Index: Python-2.7.2/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.2/Modules/getpath.c
+Index: Python-2.7.9/Modules/getpath.c
===================================================================
---- Python-2.7.2.orig/Modules/getpath.c
-+++ Python-2.7.2/Modules/getpath.c
+--- Python-2.7.9.orig/Modules/getpath.c
++++ Python-2.7.9/Modules/getpath.c
@@ -116,9 +116,11 @@
#define EXEC_PREFIX PREFIX
#endif
@@ -209,10 +263,10 @@ Index: Python-2.7.2/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.2/Python/getplatform.c
+Index: Python-2.7.9/Python/getplatform.c
===================================================================
---- Python-2.7.2.orig/Python/getplatform.c
-+++ Python-2.7.2/Python/getplatform.c
+--- Python-2.7.9.orig/Python/getplatform.c
++++ Python-2.7.9/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -227,31 +281,16 @@ Index: Python-2.7.2/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.2/Python/sysmodule.c
+Index: Python-2.7.9/Python/sysmodule.c
===================================================================
---- Python-2.7.2.orig/Python/sysmodule.c
-+++ Python-2.7.2/Python/sysmodule.c
-@@ -1416,6 +1416,8 @@ _PySys_Init(void)
+--- Python-2.7.9.orig/Python/sysmodule.c
++++ Python-2.7.9/Python/sysmodule.c
+@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyString_FromString(Py_GetPlatform()));
+ SET_SYS_FROM_STRING("lib",
-+ PyString_FromString(Py_GetLib()));
++ PyString_FromString(Py_GetLib()));
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.2/configure.in
-===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -629,6 +629,10 @@ SunOS*)
- ;;
- esac
-
-+AC_SUBST(LIB)
-+AC_MSG_CHECKING(LIB)
-+LIB=`basename ${libdir}`
-+AC_MSG_RESULT($LIB)
-
- AC_SUBST(LIBRARY)
- AC_MSG_CHECKING(LIBRARY)
diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch
deleted file mode 100644
index 725531a240..0000000000
--- a/meta/recipes-devtools/python/python/posix_close.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-backport from http://bugs.python.org/issue20594
-
-- Issue #20594: Avoid name clash with the libc function posix_close.
-
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1392131776 18000
-# Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932
-# Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3
-avoid name clash with posix_close (closes #20594)
-
-diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
---- a/Modules/posixmodule.c
-+++ b/Modules/posixmodule.c
-@@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__,
- "close(fd)\n\n\
- Close a file descriptor (for low level IO).");
-
--static PyObject *
--posix_close(PyObject *self, PyObject *args)
-+/*
-+The underscore at end of function name avoids a name clash with the libc
-+function posix_close.
-+*/
-+static PyObject *
-+posix_close_(PyObject *self, PyObject *args)
- {
- int fd, res;
- if (!PyArg_ParseTuple(args, "i:close", &fd))
-@@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = {
- {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
- #endif /* HAVE_TCSETPGRP */
- {"open", posix_open, METH_VARARGS, posix_open__doc__},
-- {"close", posix_close, METH_VARARGS, posix_close__doc__},
-+ {"close", posix_close_, METH_VARARGS, posix_close__doc__},
- {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
- {"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
- {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},
-
diff --git a/meta/recipes-devtools/python/python/pypirc-secure.patch b/meta/recipes-devtools/python/python/pypirc-secure.patch
deleted file mode 100644
index 8e2df677b6..0000000000
--- a/meta/recipes-devtools/python/python/pypirc-secure.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-# HG changeset patch
-# User Philip Jenvey <pjenvey@underboss.org>
-# Date 1322701507 28800
-# Branch 2.7
-# Node ID e7c20a8476a0e2ca18f8040864cbc400818d8f24
-# Parent 3ecddf168f1f554a17a047384fe0b02f2d688277
-create the .pypirc securely
-
-Upstream-Status: Backport
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-
-diff -r 3ecddf168f1f -r e7c20a8476a0 Lib/distutils/config.py
---- a/Lib/distutils/config.py Tue Nov 29 00:53:09 2011 +0100
-+++ b/Lib/distutils/config.py Wed Nov 30 17:05:07 2011 -0800
-@@ -42,16 +42,8 @@
- def _store_pypirc(self, username, password):
- """Creates a default .pypirc file."""
- rc = self._get_rc_file()
-- f = open(rc, 'w')
-- try:
-- f.write(DEFAULT_PYPIRC % (username, password))
-- finally:
-- f.close()
-- try:
-- os.chmod(rc, 0600)
-- except OSError:
-- # should do something better here
-- pass
-+ with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp:
-+ fp.write(DEFAULT_PYPIRC % (username, password))
-
- def _read_pypirc(self):
- """Reads the .pypirc file."""
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
deleted file mode 100644
index 3afdbc0f6e..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Upstream-Status: Backport
-
-Reference:http://bugs.python.org/issue14579
-
-The utf-16 decoder in Python 3.1 through 3.3 does not update the
-aligned_end variable after calling the unicode_decode_call_errorhandler
-function, which allows remote attackers to obtain sensitive information
-(process memory) or cause a denial of service (memory corruption and crash)
-via unspecified vectors.
-
-http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135
-
-diff -urpN a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
---- a/Lib/test/test_codecs.py
-+++ b/Lib/test/test_codecs.py
-@@ -495,8 +495,21 @@ class UTF16LETest(ReadTest):
- )
-
- def test_errors(self):
-- self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode, "\xff", "strict", True)
--
-+ tests = [
-+ (b'\xff', u'\ufffd'),
-+ (b'A\x00Z', u'A\ufffd'),
-+ (b'A\x00B\x00C\x00D\x00Z', u'ABCD\ufffd'),
-+ (b'\x00\xd8', u'\ufffd'),
-+ (b'\x00\xd8A', u'\ufffd'),
-+ (b'\x00\xd8A\x00', u'\ufffdA'),
-+ (b'\x00\xdcA\x00', u'\ufffdA'),
-+ ]
-+ for raw, expected in tests:
-+ print('*****', raw, expected)
-+ self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode,
-+ raw, 'strict', True)
-+ self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
-+
- class UTF16BETest(ReadTest):
- encoding = "utf-16-be"
-
-@@ -516,7 +529,20 @@ class UTF16BETest(ReadTest):
- )
-
- def test_errors(self):
-- self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode, "\xff", "strict", True)
-+ tests = [
-+ (b'\xff', u'\ufffd'),
-+ (b'\x00A\xff', u'A\ufffd'),
-+ (b'\x00A\x00B\x00C\x00DZ', u'ABCD\ufffd'),
-+ (b'\xd8\x00', u'\ufffd'),
-+ (b'\xd8\x00\xdc', u'\ufffd'),
-+ (b'\xd8\x00\x00A', u'\ufffdA'),
-+ (b'\xdc\x00\x00A', u'\ufffdA'),
-+ ]
-+ for raw, expected in tests:
-+ print('*****', raw, expected)
-+ self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode,
-+ raw, 'strict', True)
-+ self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
-
- class UTF8Test(ReadTest):
- encoding = "utf-8"
-diff -urpN a/Objects/unicodeobject.c b/Objects/unicodeobject.c
---- a/Objects/unicodeobject.c 2013-03-04 11:34:34.000000000 +0800
-+++ b/Objects/unicodeobject.c 2013-03-04 11:36:01.000000000 +0800
-@@ -2564,7 +2564,7 @@ PyUnicode_DecodeUTF16Stateful(const char
- }
-
- /* UTF-16 code pair: */
-- if (q >= e) {
-+ if (e - q < 2) {
- errmsg = "unexpected end of data";
- startinpos = (((const char *)q)-2)-starts;
- endinpos = ((const char *)e)-starts;
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch
deleted file mode 100644
index f34ff40ea5..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Upstream-Status: Backport
-
-Reference: http://bugs.python.org/issue16042
-
-CVE-2013-1752: smtplib: Limit amount of data read by limiting the
-call to readline(). Original patch by Christian Heimes
-
-Signed-off-by: Maxin B. John <maxin.john@enea.com>
----
-diff -Naur Python-2.7.3-orig/Lib/smtplib.py Python-2.7.3/Lib/smtplib.py
---- Python-2.7.3-orig/Lib/smtplib.py 2012-04-10 01:07:31.000000000 +0200
-+++ Python-2.7.3/Lib/smtplib.py 2014-02-27 14:15:24.444198465 +0100
-@@ -57,6 +57,7 @@
- SMTP_PORT = 25
- SMTP_SSL_PORT = 465
- CRLF = "\r\n"
-+_MAXLINE = 8192 # more than 8 times larger than RFC 821, 4.5.3
-
- OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I)
-
-@@ -179,10 +180,14 @@
- def __init__(self, sslobj):
- self.sslobj = sslobj
-
-- def readline(self):
-+ def readline(self, size=-1):
-+ if size < 0:
-+ size = None
- str = ""
- chr = None
- while chr != "\n":
-+ if size is not None and len(str) >= size:
-+ break
- chr = self.sslobj.read(1)
- if not chr:
- break
-@@ -351,7 +356,7 @@
- self.file = self.sock.makefile('rb')
- while 1:
- try:
-- line = self.file.readline()
-+ line = self.file.readline(_MAXLINE + 1)
- except socket.error as e:
- self.close()
- raise SMTPServerDisconnected("Connection unexpectedly closed: "
-@@ -361,6 +366,8 @@
- raise SMTPServerDisconnected("Connection unexpectedly closed")
- if self.debuglevel > 0:
- print>>stderr, 'reply:', repr(line)
-+ if len(line) > _MAXLINE:
-+ raise SMTPResponseException(500, "Line too long.")
- resp.append(line[4:].strip())
- code = line[:3]
- # Check that the error code is syntactically correct.
-diff -Naur Python-2.7.3-orig/Lib/test/test_smtplib.py Python-2.7.3/Lib/test/test_smtplib.py
---- Python-2.7.3-orig/Lib/test/test_smtplib.py 2012-04-10 01:07:32.000000000 +0200
-+++ Python-2.7.3/Lib/test/test_smtplib.py 2014-02-27 14:15:24.448198293 +0100
-@@ -292,6 +292,33 @@
- HOST, self.port, 'localhost', 3)
-
-
-+@unittest.skipUnless(threading, 'Threading required for this test.')
-+class TooLongLineTests(unittest.TestCase):
-+ respdata = '250 OK' + ('.' * smtplib._MAXLINE * 2) + '\n'
-+
-+ def setUp(self):
-+ self.old_stdout = sys.stdout
-+ self.output = StringIO.StringIO()
-+ sys.stdout = self.output
-+
-+ self.evt = threading.Event()
-+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-+ self.sock.settimeout(15)
-+ self.port = test_support.bind_port(self.sock)
-+ servargs = (self.evt, self.respdata, self.sock)
-+ threading.Thread(target=server, args=servargs).start()
-+ self.evt.wait()
-+ self.evt.clear()
-+
-+ def tearDown(self):
-+ self.evt.wait()
-+ sys.stdout = self.old_stdout
-+
-+ def testLineTooLong(self):
-+ self.assertRaises(smtplib.SMTPResponseException, smtplib.SMTP,
-+ HOST, self.port, 'localhost', 3)
-+
-+
- sim_users = {'Mr.A@somewhere.com':'John A',
- 'Ms.B@somewhere.com':'Sally B',
- 'Mrs.C@somewhereesle.com':'Ruth C',
-@@ -511,7 +538,8 @@
- def test_main(verbose=None):
- test_support.run_unittest(GeneralTests, DebuggingServerTests,
- NonConnectingTests,
-- BadHELOServerTests, SMTPSimTests)
-+ BadHELOServerTests, SMTPSimTests,
-+ TooLongLineTests)
-
- if __name__ == '__main__':
- test_main()
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch
deleted file mode 100644
index 02cc83d314..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Upstream-Status: Backport
-
-Reference: http://bugs.python.org/issue20246
-
-CVE-2014-1912: Python buffer overflow in socket.recvfrom_into()
-lets remote users execute arbitrary code.Original patch by Benjamin Peterson
-
-Signed-off-by: Maxin B. John <maxin.john@enea.com>
----
-diff -r 40fb60df4755 Modules/socketmodule.c
---- a/Modules/socketmodule.c Sun Jan 12 12:11:47 2014 +0200
-+++ b/Modules/socketmodule.c Mon Jan 13 16:36:35 2014 -0800
-@@ -2744,6 +2744,13 @@
- recvlen = buflen;
- }
-
-+ /* Check if the buffer is large enough */
-+ if (buflen < recvlen) {
-+ PyErr_SetString(PyExc_ValueError,
-+ "buffer too small for requested bytes");
-+ goto error;
-+ }
-+
- readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
- if (readlen < 0) {
- /* Return an error */
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
deleted file mode 100644
index 60ef145c7c..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 104eb318283dde5203aa6cf7384287bef181e308 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Wed, 12 Nov 2014 01:58:02 -0500
-Subject: [PATCH] python: fix CVE-2014-7185
-
-Reference: http://bugs.python.org/issue21831
-
-CVE-2014-7185: Integer overflow in bufferobject.c in Python before
-2.7.8 allows context-dependent attackers to obtain sensitive
-information from process memory via a large size and offset in a
-"buffer" function.
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- Lib/test/test_buffer.py | 6 ++++++
- Misc/NEWS | 3 +++
- Objects/bufferobject.c | 2 +-
- 3 files changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
-index 6bdc34d..3ac1f8c 100644
---- a/Lib/test/test_buffer.py
-+++ b/Lib/test/test_buffer.py
-@@ -4,6 +4,7 @@ For now, tests just new or changed functionality.
-
- """
-
-+import sys
- import unittest
- from test import test_support
-
-@@ -21,6 +22,11 @@ class BufferTests(unittest.TestCase):
- self.assertEqual(b[start:stop:step],
- s[start:stop:step])
-
-+ def test_large_buffer_size_and_offset(self):
-+ data = bytearray('hola mundo')
-+ buf = buffer(data, sys.maxsize, sys.maxsize)
-+ self.assertEqual(buf[:4096], "")
-+
-
- def test_main():
- with test_support.check_py3k_warnings(("buffer.. not supported",
-diff --git a/Misc/NEWS b/Misc/NEWS
-index e8778ad..77396c5 100644
---- a/Misc/NEWS
-+++ b/Misc/NEWS
-@@ -1896,6 +1896,9 @@ What's New in Python 2.7 Release Candidate 1?
- Core and Builtins
- -----------------
-
-+- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
-+ the buffer type. CVE-2014-7185.
-+
- - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
- start byte and the continuation byte(s) are now considered invalid, instead
- of the number of bytes specified by the start byte.
-diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c
-index c52f0bc..c542506 100644
---- a/Objects/bufferobject.c
-+++ b/Objects/bufferobject.c
-@@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size,
- *size = count;
- else
- *size = self->b_size;
-- if (offset + *size > count)
-+ if (*size > count - offset)
- *size = count - offset;
- }
- return 1;
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch b/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
deleted file mode 100644
index 3df33368ec..0000000000
--- a/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
+++ /dev/null
@@ -1,1572 +0,0 @@
-Upstream-Status: Inappropriate [not author]
-
-Fix to support db 5.3 for bsddb module in python 2.7.2
-
-This patch is made from the db5.1.diff in
-http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.3-0ubuntu3.diff.gz
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- Lib/bsddb/__init__.py | 2 +-
- Lib/bsddb/test/test_all.py | 5 +-
- Lib/bsddb/test/test_dbenv.py | 29 +++-
- Modules/_bsddb.c | 439 +++++++++++++++++++++++-------------------
- Modules/bsddb.h | 20 +-
- setup.py | 25 +++-
- 6 files changed, 307 insertions(+), 213 deletions(-)
-
-diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py
-index ed4deea..1b1c388 100644
---- a/Lib/bsddb/__init__.py
-+++ b/Lib/bsddb/__init__.py
-@@ -33,7 +33,7 @@
- #----------------------------------------------------------------------
-
-
--"""Support for Berkeley DB 4.1 through 4.8 with a simple interface.
-+"""Support for Berkeley DB 4.2 through 5.3 with a simple interface.
-
- For the full featured object oriented interface use the bsddb.db module
- instead. It mirrors the Oracle Berkeley DB C API.
-diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py
-index e9fe618..6a25f4a 100644
---- a/Lib/bsddb/test/test_all.py
-+++ b/Lib/bsddb/test/test_all.py
-@@ -484,6 +484,8 @@ def print_versions():
- print '-=' * 38
- print db.DB_VERSION_STRING
- print 'bsddb.db.version(): %s' % (db.version(), )
-+ if db.version() >= (5, 0) :
-+ print 'bsddb.db.full_version(): %s' %repr(db.full_version())
- print 'bsddb.db.__version__: %s' % db.__version__
- print 'bsddb.db.cvsid: %s' % db.cvsid
-
-@@ -528,7 +530,8 @@ def get_new_database_path() :
-
- # This path can be overriden via "set_test_path_prefix()".
- import os, os.path
--get_new_path.prefix=os.path.join(os.sep,"tmp","z-Berkeley_DB")
-+get_new_path.prefix=os.path.join(os.environ.get("TMPDIR",
-+ os.path.join(os.sep,"tmp")), "z-Berkeley_DB")
- get_new_path.num=0
-
- def get_test_path_prefix() :
-diff --git a/Lib/bsddb/test/test_dbenv.py b/Lib/bsddb/test/test_dbenv.py
-index 37281df..6ac1e54 100644
---- a/Lib/bsddb/test/test_dbenv.py
-+++ b/Lib/bsddb/test/test_dbenv.py
-@@ -25,12 +25,31 @@ class DBEnv(unittest.TestCase):
- test_support.rmtree(self.homeDir)
-
- class DBEnv_general(DBEnv) :
-+ def test_get_open_flags(self) :
-+ flags = db.DB_CREATE | db.DB_INIT_MPOOL
-+ self.env.open(self.homeDir, flags)
-+ self.assertEqual(flags, self.env.get_open_flags())
-+
-+ def test_get_open_flags2(self) :
-+ flags = db.DB_CREATE | db.DB_INIT_MPOOL | \
-+ db.DB_INIT_LOCK | db.DB_THREAD
-+ self.env.open(self.homeDir, flags)
-+ self.assertEqual(flags, self.env.get_open_flags())
-+
- if db.version() >= (4, 7) :
- def test_lk_partitions(self) :
- for i in [10, 20, 40] :
- self.env.set_lk_partitions(i)
- self.assertEqual(i, self.env.get_lk_partitions())
-
-+ def test_getset_intermediate_dir_mode(self) :
-+ self.assertEqual(None, self.env.get_intermediate_dir_mode())
-+ for mode in ["rwx------", "rw-rw-rw-", "rw-r--r--"] :
-+ self.env.set_intermediate_dir_mode(mode)
-+ self.assertEqual(mode, self.env.get_intermediate_dir_mode())
-+ self.assertRaises(db.DBInvalidArgError,
-+ self.env.set_intermediate_dir_mode, "abcde")
-+
- if db.version() >= (4, 6) :
- def test_thread(self) :
- for i in [16, 100, 1000] :
-@@ -115,7 +134,7 @@ class DBEnv_general(DBEnv) :
- self.assertEqual(i, self.env.get_lk_max_lockers())
-
- def test_lg_regionmax(self) :
-- for i in [128, 256, 1024] :
-+ for i in [128, 256, 1000] :
- i = i*1024*1024
- self.env.set_lg_regionmax(i)
- j = self.env.get_lg_regionmax()
-@@ -172,8 +191,12 @@ class DBEnv_general(DBEnv) :
- self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL)
- cachesize = (0, 2*1024*1024, 1)
- self.assertRaises(db.DBInvalidArgError,
-- self.env.set_cachesize, *cachesize)
-- self.assertEqual(cachesize2, self.env.get_cachesize())
-+ self.env.set_cachesize, *cachesize)
-+ cachesize3 = self.env.get_cachesize()
-+ self.assertEqual(cachesize2[0], cachesize3[0])
-+ self.assertEqual(cachesize2[2], cachesize3[2])
-+ # In Berkeley DB 5.3, the cachesize can change when opening the Env
-+ self.assertTrue(cachesize2[1] <= cachesize3[1])
-
- def test_set_cachesize_dbenv_db(self) :
- # You can not configure the cachesize using
-diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
-index d2d12ff..e98e4bc 100644
---- a/Modules/_bsddb.c
-+++ b/Modules/_bsddb.c
-@@ -187,8 +187,10 @@ static PyObject* DBOldVersionError; /* DB_OLD_VERSION */
- static PyObject* DBRunRecoveryError; /* DB_RUNRECOVERY */
- static PyObject* DBVerifyBadError; /* DB_VERIFY_BAD */
- static PyObject* DBNoServerError; /* DB_NOSERVER */
-+#if (DBVER < 52)
- static PyObject* DBNoServerHomeError; /* DB_NOSERVER_HOME */
- static PyObject* DBNoServerIDError; /* DB_NOSERVER_ID */
-+#endif
- static PyObject* DBPageNotFoundError; /* DB_PAGE_NOTFOUND */
- static PyObject* DBSecondaryBadError; /* DB_SECONDARY_BAD */
-
-@@ -202,9 +204,7 @@ static PyObject* DBFileExistsError; /* EEXIST */
- static PyObject* DBNoSuchFileError; /* ENOENT */
- static PyObject* DBPermissionsError; /* EPERM */
-
--#if (DBVER >= 42)
- static PyObject* DBRepHandleDeadError; /* DB_REP_HANDLE_DEAD */
--#endif
- #if (DBVER >= 44)
- static PyObject* DBRepLockoutError; /* DB_REP_LOCKOUT */
- #endif
-@@ -696,8 +696,10 @@ static int makeDBError(int err)
- case DB_RUNRECOVERY: errObj = DBRunRecoveryError; break;
- case DB_VERIFY_BAD: errObj = DBVerifyBadError; break;
- case DB_NOSERVER: errObj = DBNoServerError; break;
-+#if (DBVER < 52)
- case DB_NOSERVER_HOME: errObj = DBNoServerHomeError; break;
- case DB_NOSERVER_ID: errObj = DBNoServerIDError; break;
-+#endif
- case DB_PAGE_NOTFOUND: errObj = DBPageNotFoundError; break;
- case DB_SECONDARY_BAD: errObj = DBSecondaryBadError; break;
- case DB_BUFFER_SMALL: errObj = DBNoMemoryError; break;
-@@ -715,9 +717,7 @@ static int makeDBError(int err)
- case ENOENT: errObj = DBNoSuchFileError; break;
- case EPERM : errObj = DBPermissionsError; break;
-
--#if (DBVER >= 42)
- case DB_REP_HANDLE_DEAD : errObj = DBRepHandleDeadError; break;
--#endif
- #if (DBVER >= 44)
- case DB_REP_LOCKOUT : errObj = DBRepLockoutError; break;
- #endif
-@@ -2132,7 +2132,7 @@ DB_get_size(DBObject* self, PyObject* args, PyObject* kwargs)
- MYDB_BEGIN_ALLOW_THREADS;
- err = self->db->get(self->db, txn, &key, &data, flags);
- MYDB_END_ALLOW_THREADS;
-- if (err == DB_BUFFER_SMALL) {
-+ if ((err == DB_BUFFER_SMALL) || (err == 0)) {
- retval = NUMBER_FromLong((long)data.size);
- err = 0;
- }
-@@ -2385,9 +2385,7 @@ DB_open(DBObject* self, PyObject* args, PyObject* kwargs)
- return NULL;
- }
-
--#if (DBVER >= 42)
- self->db->get_flags(self->db, &self->setflags);
--#endif
-
- self->flags = flags;
-
-@@ -2539,6 +2537,37 @@ DB_get_priority(DBObject* self)
- #endif
-
- static PyObject*
-+DB_get_dbname(DBObject* self)
-+{
-+ int err;
-+ const char *filename, *dbname;
-+
-+ CHECK_DB_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db->get_dbname(self->db, &filename, &dbname);
-+ MYDB_END_ALLOW_THREADS;
-+ RETURN_IF_ERR();
-+ /* If "dbname==NULL", it is correctly converted to "None" */
-+ return Py_BuildValue("(ss)", filename, dbname);
-+}
-+
-+static PyObject*
-+DB_get_open_flags(DBObject* self)
-+{
-+ int err;
-+ unsigned int flags;
-+
-+ CHECK_DB_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db->get_open_flags(self->db, &flags);
-+ MYDB_END_ALLOW_THREADS;
-+ RETURN_IF_ERR();
-+ return NUMBER_FromLong(flags);
-+}
-+
-+static PyObject*
- DB_set_q_extentsize(DBObject* self, PyObject* args)
- {
- int err;
-@@ -2555,7 +2584,6 @@ DB_set_q_extentsize(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_q_extentsize(DBObject* self)
- {
-@@ -2570,7 +2598,6 @@ DB_get_q_extentsize(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(extentsize);
- }
--#endif
-
- static PyObject*
- DB_set_bt_minkey(DBObject* self, PyObject* args)
-@@ -2588,7 +2615,6 @@ DB_set_bt_minkey(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_bt_minkey(DBObject* self)
- {
-@@ -2603,7 +2629,6 @@ DB_get_bt_minkey(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(bt_minkey);
- }
--#endif
-
- static int
- _default_cmp(const DBT *leftKey,
-@@ -2759,7 +2784,6 @@ DB_set_cachesize(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_cachesize(DBObject* self)
- {
-@@ -2777,7 +2801,6 @@ DB_get_cachesize(DBObject* self)
-
- return Py_BuildValue("(iii)", gbytes, bytes, ncache);
- }
--#endif
-
- static PyObject*
- DB_set_flags(DBObject* self, PyObject* args)
-@@ -2797,7 +2820,6 @@ DB_set_flags(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_flags(DBObject* self)
- {
-@@ -2812,6 +2834,35 @@ DB_get_flags(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(flags);
- }
-+
-+#if (DBVER >= 43)
-+static PyObject*
-+DB_get_transactional(DBObject* self)
-+{
-+ int err;
-+
-+ CHECK_DB_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db->get_transactional(self->db);
-+ MYDB_END_ALLOW_THREADS;
-+
-+ if(err == 0) {
-+ Py_INCREF(Py_False);
-+ return Py_False;
-+ } else if(err == 1) {
-+ Py_INCREF(Py_True);
-+ return Py_True;
-+ }
-+
-+ /*
-+ ** If we reach there, there was an error. The
-+ ** "return" should be unreachable.
-+ */
-+ RETURN_IF_ERR();
-+ assert(0); /* This coude SHOULD be unreachable */
-+ return NULL;
-+}
- #endif
-
- static PyObject*
-@@ -2830,7 +2881,6 @@ DB_set_h_ffactor(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_h_ffactor(DBObject* self)
- {
-@@ -2845,7 +2895,6 @@ DB_get_h_ffactor(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(ffactor);
- }
--#endif
-
- static PyObject*
- DB_set_h_nelem(DBObject* self, PyObject* args)
-@@ -2863,7 +2912,6 @@ DB_set_h_nelem(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_h_nelem(DBObject* self)
- {
-@@ -2878,7 +2926,6 @@ DB_get_h_nelem(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(nelem);
- }
--#endif
-
- static PyObject*
- DB_set_lorder(DBObject* self, PyObject* args)
-@@ -2896,7 +2943,6 @@ DB_set_lorder(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_lorder(DBObject* self)
- {
-@@ -2911,7 +2957,6 @@ DB_get_lorder(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lorder);
- }
--#endif
-
- static PyObject*
- DB_set_pagesize(DBObject* self, PyObject* args)
-@@ -2929,7 +2974,6 @@ DB_set_pagesize(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_pagesize(DBObject* self)
- {
-@@ -2944,7 +2988,6 @@ DB_get_pagesize(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(pagesize);
- }
--#endif
-
- static PyObject*
- DB_set_re_delim(DBObject* self, PyObject* args)
-@@ -2967,7 +3010,6 @@ DB_set_re_delim(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_re_delim(DBObject* self)
- {
-@@ -2981,7 +3023,6 @@ DB_get_re_delim(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(re_delim);
- }
--#endif
-
- static PyObject*
- DB_set_re_len(DBObject* self, PyObject* args)
-@@ -2999,7 +3040,6 @@ DB_set_re_len(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_re_len(DBObject* self)
- {
-@@ -3014,7 +3054,6 @@ DB_get_re_len(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(re_len);
- }
--#endif
-
- static PyObject*
- DB_set_re_pad(DBObject* self, PyObject* args)
-@@ -3036,7 +3075,6 @@ DB_set_re_pad(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_re_pad(DBObject* self)
- {
-@@ -3050,7 +3088,6 @@ DB_get_re_pad(DBObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(re_pad);
- }
--#endif
-
- static PyObject*
- DB_set_re_source(DBObject* self, PyObject* args)
-@@ -3069,7 +3106,6 @@ DB_set_re_source(DBObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_re_source(DBObject* self)
- {
-@@ -3084,7 +3120,6 @@ DB_get_re_source(DBObject* self)
- RETURN_IF_ERR();
- return PyBytes_FromString(source);
- }
--#endif
-
- static PyObject*
- DB_stat(DBObject* self, PyObject* args, PyObject* kwargs)
-@@ -3381,7 +3416,6 @@ DB_set_encrypt(DBObject* self, PyObject* args, PyObject* kwargs)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DB_get_encrypt_flags(DBObject* self)
- {
-@@ -3396,7 +3430,6 @@ DB_get_encrypt_flags(DBObject* self)
-
- return NUMBER_FromLong(flags);
- }
--#endif
-
-
-
-@@ -4987,7 +5020,6 @@ DBEnv_set_encrypt(DBEnvObject* self, PyObject* args, PyObject* kwargs)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_encrypt_flags(DBEnvObject* self)
- {
-@@ -5025,7 +5057,6 @@ DBEnv_get_timeout(DBEnvObject* self, PyObject* args, PyObject* kwargs)
- RETURN_IF_ERR();
- return NUMBER_FromLong(timeout);
- }
--#endif
-
-
- static PyObject*
-@@ -5064,7 +5095,6 @@ DBEnv_set_shm_key(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_shm_key(DBEnvObject* self)
- {
-@@ -5081,7 +5111,6 @@ DBEnv_get_shm_key(DBEnvObject* self)
-
- return NUMBER_FromLong(shm_key);
- }
--#endif
-
- #if (DBVER >= 46)
- static PyObject*
-@@ -5170,7 +5199,6 @@ DBEnv_set_cachesize(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_cachesize(DBEnvObject* self)
- {
-@@ -5188,7 +5216,6 @@ DBEnv_get_cachesize(DBEnvObject* self)
-
- return Py_BuildValue("(iii)", gbytes, bytes, ncache);
- }
--#endif
-
-
- static PyObject*
-@@ -5208,7 +5235,6 @@ DBEnv_set_flags(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_flags(DBEnvObject* self)
- {
-@@ -5223,7 +5249,6 @@ DBEnv_get_flags(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(flags);
- }
--#endif
-
- #if (DBVER >= 47)
- static PyObject*
-@@ -5423,7 +5448,6 @@ DBEnv_set_data_dir(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_data_dirs(DBEnvObject* self)
- {
-@@ -5463,7 +5487,6 @@ DBEnv_get_data_dirs(DBEnvObject* self)
- }
- return tuple;
- }
--#endif
-
- #if (DBVER >= 44)
- static PyObject*
-@@ -5513,7 +5536,6 @@ DBEnv_set_lg_bsize(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lg_bsize(DBEnvObject* self)
- {
-@@ -5528,7 +5550,6 @@ DBEnv_get_lg_bsize(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lg_bsize);
- }
--#endif
-
- static PyObject*
- DBEnv_set_lg_dir(DBEnvObject* self, PyObject* args)
-@@ -5547,7 +5568,6 @@ DBEnv_set_lg_dir(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lg_dir(DBEnvObject* self)
- {
-@@ -5562,7 +5582,6 @@ DBEnv_get_lg_dir(DBEnvObject* self)
- RETURN_IF_ERR();
- return PyBytes_FromString(dirp);
- }
--#endif
-
- static PyObject*
- DBEnv_set_lg_max(DBEnvObject* self, PyObject* args)
-@@ -5580,7 +5599,6 @@ DBEnv_set_lg_max(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lg_max(DBEnvObject* self)
- {
-@@ -5595,8 +5613,6 @@ DBEnv_get_lg_max(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lg_max);
- }
--#endif
--
-
- static PyObject*
- DBEnv_set_lg_regionmax(DBEnvObject* self, PyObject* args)
-@@ -5614,7 +5630,6 @@ DBEnv_set_lg_regionmax(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lg_regionmax(DBEnvObject* self)
- {
-@@ -5629,7 +5644,6 @@ DBEnv_get_lg_regionmax(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lg_regionmax);
- }
--#endif
-
- #if (DBVER >= 47)
- static PyObject*
-@@ -5680,7 +5694,6 @@ DBEnv_set_lk_detect(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lk_detect(DBEnvObject* self)
- {
-@@ -5695,8 +5708,6 @@ DBEnv_get_lk_detect(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lk_detect);
- }
--#endif
--
-
- #if (DBVER < 45)
- static PyObject*
-@@ -5734,7 +5745,6 @@ DBEnv_set_lk_max_locks(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lk_max_locks(DBEnvObject* self)
- {
-@@ -5749,7 +5759,6 @@ DBEnv_get_lk_max_locks(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lk_max);
- }
--#endif
-
- static PyObject*
- DBEnv_set_lk_max_lockers(DBEnvObject* self, PyObject* args)
-@@ -5767,7 +5776,6 @@ DBEnv_set_lk_max_lockers(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lk_max_lockers(DBEnvObject* self)
- {
-@@ -5782,7 +5790,6 @@ DBEnv_get_lk_max_lockers(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lk_max);
- }
--#endif
-
- static PyObject*
- DBEnv_set_lk_max_objects(DBEnvObject* self, PyObject* args)
-@@ -5800,7 +5807,6 @@ DBEnv_set_lk_max_objects(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_lk_max_objects(DBEnvObject* self)
- {
-@@ -5815,9 +5821,7 @@ DBEnv_get_lk_max_objects(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(lk_max);
- }
--#endif
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_mp_mmapsize(DBEnvObject* self)
- {
-@@ -5832,8 +5836,6 @@ DBEnv_get_mp_mmapsize(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(mmapsize);
- }
--#endif
--
-
- static PyObject*
- DBEnv_set_mp_mmapsize(DBEnvObject* self, PyObject* args)
-@@ -5869,8 +5871,6 @@ DBEnv_set_tmp_dir(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_tmp_dir(DBEnvObject* self)
- {
-@@ -5887,8 +5887,6 @@ DBEnv_get_tmp_dir(DBEnvObject* self)
-
- return PyBytes_FromString(dirpp);
- }
--#endif
--
-
- static PyObject*
- DBEnv_txn_recover(DBEnvObject* self)
-@@ -5899,7 +5897,7 @@ DBEnv_txn_recover(DBEnvObject* self)
- DBTxnObject *txn;
- #define PREPLIST_LEN 16
- DB_PREPLIST preplist[PREPLIST_LEN];
--#if (DBVER < 48)
-+#if (DBVER < 48 || DBVER > 51)
- long retp;
- #else
- u_int32_t retp;
-@@ -6003,8 +6001,6 @@ DBEnv_txn_checkpoint(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_tx_max(DBEnvObject* self)
- {
-@@ -6019,8 +6015,6 @@ DBEnv_get_tx_max(DBEnvObject* self)
- RETURN_IF_ERR();
- return PyLong_FromUnsignedLong(max);
- }
--#endif
--
-
- static PyObject*
- DBEnv_set_tx_max(DBEnvObject* self, PyObject* args)
-@@ -6038,8 +6032,6 @@ DBEnv_set_tx_max(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_tx_timestamp(DBEnvObject* self)
- {
-@@ -6054,7 +6046,6 @@ DBEnv_get_tx_timestamp(DBEnvObject* self)
- RETURN_IF_ERR();
- return NUMBER_FromLong(timestamp);
- }
--#endif
-
- static PyObject*
- DBEnv_set_tx_timestamp(DBEnvObject* self, PyObject* args)
-@@ -6756,6 +6747,55 @@ DBEnv_set_private(DBEnvObject* self, PyObject* private_obj)
- RETURN_NONE();
- }
-
-+#if (DBVER >= 47)
-+static PyObject*
-+DBEnv_set_intermediate_dir_mode(DBEnvObject* self, PyObject* args)
-+{
-+ int err;
-+ const char *mode;
-+
-+ if (!PyArg_ParseTuple(args,"s:set_intermediate_dir_mode", &mode))
-+ return NULL;
-+
-+ CHECK_ENV_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db_env->set_intermediate_dir_mode(self->db_env, mode);
-+ MYDB_END_ALLOW_THREADS;
-+ RETURN_IF_ERR();
-+ RETURN_NONE();
-+}
-+
-+static PyObject*
-+DBEnv_get_intermediate_dir_mode(DBEnvObject* self)
-+{
-+ int err;
-+ const char *mode;
-+
-+ CHECK_ENV_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db_env->get_intermediate_dir_mode(self->db_env, &mode);
-+ MYDB_END_ALLOW_THREADS;
-+ RETURN_IF_ERR();
-+ return Py_BuildValue("s", mode);
-+}
-+#endif
-+
-+static PyObject*
-+DBEnv_get_open_flags(DBEnvObject* self)
-+{
-+ int err;
-+ unsigned int flags;
-+
-+ CHECK_ENV_NOT_CLOSED(self);
-+
-+ MYDB_BEGIN_ALLOW_THREADS;
-+ err = self->db_env->get_open_flags(self->db_env, &flags);
-+ MYDB_END_ALLOW_THREADS;
-+ RETURN_IF_ERR();
-+ return NUMBER_FromLong(flags);
-+}
-
- #if (DBVER < 48)
- static PyObject*
-@@ -6875,7 +6915,6 @@ DBEnv_set_verbose(DBEnvObject* self, PyObject* args)
- RETURN_NONE();
- }
-
--#if (DBVER >= 42)
- static PyObject*
- DBEnv_get_verbose(DBEnvObject* self, PyObject* args)
- {
-@@ -6893,7 +6932,6 @@ DBEnv_get_verbose(DBEnvObject* self, PyObject* args)
- RETURN_IF_ERR();
- return PyBool_FromLong(verbose);
- }
--#endif
-
- #if (DBVER >= 45)
- static void
-@@ -6975,9 +7013,7 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args)
- PyObject *control_py, *rec_py;
- DBT control, rec;
- int envid;
--#if (DBVER >= 42)
- DB_LSN lsn;
--#endif
-
- if (!PyArg_ParseTuple(args, "OOi:rep_process_message", &control_py,
- &rec_py, &envid))
-@@ -6994,13 +7030,8 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args)
- err = self->db_env->rep_process_message(self->db_env, &control, &rec,
- envid, &lsn);
- #else
--#if (DBVER >= 42)
- err = self->db_env->rep_process_message(self->db_env, &control, &rec,
- &envid, &lsn);
--#else
-- err = self->db_env->rep_process_message(self->db_env, &control, &rec,
-- &envid);
--#endif
- #endif
- MYDB_END_ALLOW_THREADS;
- switch (err) {
-@@ -7029,12 +7060,10 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args)
- return r;
- break;
- }
--#if (DBVER >= 42)
- case DB_REP_NOTPERM :
- case DB_REP_ISPERM :
- return Py_BuildValue("(i(ll))", err, lsn.file, lsn.offset);
- break;
--#endif
- }
- RETURN_IF_ERR();
- return Py_BuildValue("(OO)", Py_None, Py_None);
-@@ -7086,20 +7115,6 @@ _DBEnv_rep_transportCallback(DB_ENV* db_env, const DBT* control, const DBT* rec,
- return ret;
- }
-
--#if (DBVER <= 41)
--static int
--_DBEnv_rep_transportCallbackOLD(DB_ENV* db_env, const DBT* control, const DBT* rec,
-- int envid, u_int32_t flags)
--{
-- DB_LSN lsn;
--
-- lsn.file = -1; /* Dummy values */
-- lsn.offset = -1;
-- return _DBEnv_rep_transportCallback(db_env, control, rec, &lsn, envid,
-- flags);
--}
--#endif
--
- static PyObject*
- DBEnv_rep_set_transport(DBEnvObject* self, PyObject* args)
- {
-@@ -7120,13 +7135,8 @@ DBEnv_rep_set_transport(DBEnvObject* self, PyObject* args)
- err = self->db_env->rep_set_transport(self->db_env, envid,
- &_DBEnv_rep_transportCallback);
- #else
--#if (DBVER >= 42)
- err = self->db_env->set_rep_transport(self->db_env, envid,
- &_DBEnv_rep_transportCallback);
--#else
-- err = self->db_env->set_rep_transport(self->db_env, envid,
-- &_DBEnv_rep_transportCallbackOLD);
--#endif
- #endif
- MYDB_END_ALLOW_THREADS;
- RETURN_IF_ERR();
-@@ -7608,6 +7618,7 @@ DBEnv_repmgr_start(DBEnvObject* self, PyObject* args, PyObject*
- RETURN_NONE();
- }
-
-+#if (DBVER < 52)
- static PyObject*
- DBEnv_repmgr_set_local_site(DBEnvObject* self, PyObject* args, PyObject*
- kwargs)
-@@ -7654,6 +7665,7 @@ DBEnv_repmgr_add_remote_site(DBEnvObject* self, PyObject* args, PyObject*
- RETURN_IF_ERR();
- return NUMBER_FromLong(eidp);
- }
-+#endif
-
- static PyObject*
- DBEnv_repmgr_set_ack_policy(DBEnvObject* self, PyObject* args)
-@@ -8482,65 +8494,43 @@ static PyMethodDef DB_methods[] = {
- {"remove", (PyCFunction)DB_remove, METH_VARARGS|METH_KEYWORDS},
- {"rename", (PyCFunction)DB_rename, METH_VARARGS},
- {"set_bt_minkey", (PyCFunction)DB_set_bt_minkey, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_bt_minkey", (PyCFunction)DB_get_bt_minkey, METH_NOARGS},
--#endif
- {"set_bt_compare", (PyCFunction)DB_set_bt_compare, METH_O},
- {"set_cachesize", (PyCFunction)DB_set_cachesize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_cachesize", (PyCFunction)DB_get_cachesize, METH_NOARGS},
--#endif
- {"set_encrypt", (PyCFunction)DB_set_encrypt, METH_VARARGS|METH_KEYWORDS},
--#if (DBVER >= 42)
- {"get_encrypt_flags", (PyCFunction)DB_get_encrypt_flags, METH_NOARGS},
--#endif
--
- {"set_flags", (PyCFunction)DB_set_flags, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_flags", (PyCFunction)DB_get_flags, METH_NOARGS},
-+#if (DBVER >= 43)
-+ {"get_transactional", (PyCFunction)DB_get_transactional, METH_NOARGS},
- #endif
- {"set_h_ffactor", (PyCFunction)DB_set_h_ffactor, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_h_ffactor", (PyCFunction)DB_get_h_ffactor, METH_NOARGS},
--#endif
- {"set_h_nelem", (PyCFunction)DB_set_h_nelem, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_h_nelem", (PyCFunction)DB_get_h_nelem, METH_NOARGS},
--#endif
- {"set_lorder", (PyCFunction)DB_set_lorder, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lorder", (PyCFunction)DB_get_lorder, METH_NOARGS},
--#endif
- {"set_pagesize", (PyCFunction)DB_set_pagesize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_pagesize", (PyCFunction)DB_get_pagesize, METH_NOARGS},
--#endif
- {"set_re_delim", (PyCFunction)DB_set_re_delim, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_re_delim", (PyCFunction)DB_get_re_delim, METH_NOARGS},
--#endif
- {"set_re_len", (PyCFunction)DB_set_re_len, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_re_len", (PyCFunction)DB_get_re_len, METH_NOARGS},
--#endif
- {"set_re_pad", (PyCFunction)DB_set_re_pad, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_re_pad", (PyCFunction)DB_get_re_pad, METH_NOARGS},
--#endif
- {"set_re_source", (PyCFunction)DB_set_re_source, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_re_source", (PyCFunction)DB_get_re_source, METH_NOARGS},
--#endif
- {"set_q_extentsize",(PyCFunction)DB_set_q_extentsize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_q_extentsize",(PyCFunction)DB_get_q_extentsize, METH_NOARGS},
--#endif
- {"set_private", (PyCFunction)DB_set_private, METH_O},
- {"get_private", (PyCFunction)DB_get_private, METH_NOARGS},
- #if (DBVER >= 46)
- {"set_priority", (PyCFunction)DB_set_priority, METH_VARARGS},
- {"get_priority", (PyCFunction)DB_get_priority, METH_NOARGS},
- #endif
-+ {"get_dbname", (PyCFunction)DB_get_dbname, METH_NOARGS},
-+ {"get_open_flags", (PyCFunction)DB_get_open_flags, METH_NOARGS},
- {"stat", (PyCFunction)DB_stat, METH_VARARGS|METH_KEYWORDS},
- #if (DBVER >= 43)
- {"stat_print", (PyCFunction)DB_stat_print,
-@@ -8639,24 +8629,18 @@ static PyMethodDef DBEnv_methods[] = {
- {"get_thread_count", (PyCFunction)DBEnv_get_thread_count, METH_NOARGS},
- #endif
- {"set_encrypt", (PyCFunction)DBEnv_set_encrypt, METH_VARARGS|METH_KEYWORDS},
--#if (DBVER >= 42)
- {"get_encrypt_flags", (PyCFunction)DBEnv_get_encrypt_flags, METH_NOARGS},
- {"get_timeout", (PyCFunction)DBEnv_get_timeout,
- METH_VARARGS|METH_KEYWORDS},
--#endif
- {"set_timeout", (PyCFunction)DBEnv_set_timeout, METH_VARARGS|METH_KEYWORDS},
- {"set_shm_key", (PyCFunction)DBEnv_set_shm_key, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_shm_key", (PyCFunction)DBEnv_get_shm_key, METH_NOARGS},
--#endif
- #if (DBVER >= 46)
- {"set_cache_max", (PyCFunction)DBEnv_set_cache_max, METH_VARARGS},
- {"get_cache_max", (PyCFunction)DBEnv_get_cache_max, METH_NOARGS},
- #endif
- {"set_cachesize", (PyCFunction)DBEnv_set_cachesize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_cachesize", (PyCFunction)DBEnv_get_cachesize, METH_NOARGS},
--#endif
- {"memp_trickle", (PyCFunction)DBEnv_memp_trickle, METH_VARARGS},
- {"memp_sync", (PyCFunction)DBEnv_memp_sync, METH_VARARGS},
- {"memp_stat", (PyCFunction)DBEnv_memp_stat,
-@@ -8685,33 +8669,21 @@ static PyMethodDef DBEnv_methods[] = {
- #endif
- #endif
- {"set_data_dir", (PyCFunction)DBEnv_set_data_dir, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_data_dirs", (PyCFunction)DBEnv_get_data_dirs, METH_NOARGS},
--#endif
--#if (DBVER >= 42)
- {"get_flags", (PyCFunction)DBEnv_get_flags, METH_NOARGS},
--#endif
- {"set_flags", (PyCFunction)DBEnv_set_flags, METH_VARARGS},
- #if (DBVER >= 47)
- {"log_set_config", (PyCFunction)DBEnv_log_set_config, METH_VARARGS},
- {"log_get_config", (PyCFunction)DBEnv_log_get_config, METH_VARARGS},
- #endif
- {"set_lg_bsize", (PyCFunction)DBEnv_set_lg_bsize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lg_bsize", (PyCFunction)DBEnv_get_lg_bsize, METH_NOARGS},
--#endif
- {"set_lg_dir", (PyCFunction)DBEnv_set_lg_dir, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lg_dir", (PyCFunction)DBEnv_get_lg_dir, METH_NOARGS},
--#endif
- {"set_lg_max", (PyCFunction)DBEnv_set_lg_max, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lg_max", (PyCFunction)DBEnv_get_lg_max, METH_NOARGS},
--#endif
- {"set_lg_regionmax",(PyCFunction)DBEnv_set_lg_regionmax, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lg_regionmax",(PyCFunction)DBEnv_get_lg_regionmax, METH_NOARGS},
--#endif
- #if (DBVER >= 44)
- {"set_lg_filemode", (PyCFunction)DBEnv_set_lg_filemode, METH_VARARGS},
- {"get_lg_filemode", (PyCFunction)DBEnv_get_lg_filemode, METH_NOARGS},
-@@ -8721,36 +8693,24 @@ static PyMethodDef DBEnv_methods[] = {
- {"get_lk_partitions", (PyCFunction)DBEnv_get_lk_partitions, METH_NOARGS},
- #endif
- {"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lk_detect", (PyCFunction)DBEnv_get_lk_detect, METH_NOARGS},
--#endif
- #if (DBVER < 45)
- {"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS},
- #endif
- {"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lk_max_locks", (PyCFunction)DBEnv_get_lk_max_locks, METH_NOARGS},
--#endif
- {"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lk_max_lockers", (PyCFunction)DBEnv_get_lk_max_lockers, METH_NOARGS},
--#endif
- {"set_lk_max_objects", (PyCFunction)DBEnv_set_lk_max_objects, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_lk_max_objects", (PyCFunction)DBEnv_get_lk_max_objects, METH_NOARGS},
--#endif
- #if (DBVER >= 43)
- {"stat_print", (PyCFunction)DBEnv_stat_print,
- METH_VARARGS|METH_KEYWORDS},
- #endif
- {"set_mp_mmapsize", (PyCFunction)DBEnv_set_mp_mmapsize, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_mp_mmapsize", (PyCFunction)DBEnv_get_mp_mmapsize, METH_NOARGS},
--#endif
- {"set_tmp_dir", (PyCFunction)DBEnv_set_tmp_dir, METH_VARARGS},
--#if (DBVER >= 42)
- {"get_tmp_dir", (PyCFunction)DBEnv_get_tmp_dir, METH_NOARGS},
--#endif
- {"txn_begin", (PyCFunction)DBEnv_txn_begin, METH_VARARGS|METH_KEYWORDS},
- {"txn_checkpoint", (PyCFunction)DBEnv_txn_checkpoint, METH_VARARGS},
- {"txn_stat", (PyCFunction)DBEnv_txn_stat, METH_VARARGS},
-@@ -8758,10 +8718,8 @@ static PyMethodDef DBEnv_methods[] = {
- {"txn_stat_print", (PyCFunction)DBEnv_txn_stat_print,
- METH_VARARGS|METH_KEYWORDS},
- #endif
--#if (DBVER >= 42)
- {"get_tx_max", (PyCFunction)DBEnv_get_tx_max, METH_NOARGS},
- {"get_tx_timestamp", (PyCFunction)DBEnv_get_tx_timestamp, METH_NOARGS},
--#endif
- {"set_tx_max", (PyCFunction)DBEnv_set_tx_max, METH_VARARGS},
- {"set_tx_timestamp", (PyCFunction)DBEnv_set_tx_timestamp, METH_VARARGS},
- {"lock_detect", (PyCFunction)DBEnv_lock_detect, METH_VARARGS},
-@@ -8804,11 +8762,16 @@ static PyMethodDef DBEnv_methods[] = {
- {"get_mp_max_write", (PyCFunction)DBEnv_get_mp_max_write, METH_NOARGS},
- #endif
- {"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS},
--#if (DBVER >= 42)
-- {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS},
-+ {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS},
-+ {"set_private", (PyCFunction)DBEnv_set_private, METH_O},
-+ {"get_private", (PyCFunction)DBEnv_get_private, METH_NOARGS},
-+ {"get_open_flags", (PyCFunction)DBEnv_get_open_flags, METH_NOARGS},
-+#if (DBVER >= 47)
-+ {"set_intermediate_dir_mode", (PyCFunction)DBEnv_set_intermediate_dir_mode,
-+ METH_VARARGS},
-+ {"get_intermediate_dir_mode", (PyCFunction)DBEnv_get_intermediate_dir_mode,
-+ METH_NOARGS},
- #endif
-- {"set_private", (PyCFunction)DBEnv_set_private, METH_O},
-- {"get_private", (PyCFunction)DBEnv_get_private, METH_NOARGS},
- {"rep_start", (PyCFunction)DBEnv_rep_start,
- METH_VARARGS|METH_KEYWORDS},
- {"rep_set_transport", (PyCFunction)DBEnv_rep_set_transport, METH_VARARGS},
-@@ -8855,10 +8818,12 @@ static PyMethodDef DBEnv_methods[] = {
- #if (DBVER >= 45)
- {"repmgr_start", (PyCFunction)DBEnv_repmgr_start,
- METH_VARARGS|METH_KEYWORDS},
-+#if (DBVER < 52)
- {"repmgr_set_local_site", (PyCFunction)DBEnv_repmgr_set_local_site,
- METH_VARARGS|METH_KEYWORDS},
- {"repmgr_add_remote_site", (PyCFunction)DBEnv_repmgr_add_remote_site,
- METH_VARARGS|METH_KEYWORDS},
-+#endif
- {"repmgr_set_ack_policy", (PyCFunction)DBEnv_repmgr_set_ack_policy,
- METH_VARARGS},
- {"repmgr_get_ack_policy", (PyCFunction)DBEnv_repmgr_get_ack_policy,
-@@ -8922,13 +8887,9 @@ DBEnv_db_home_get(DBEnvObject* self)
-
- CHECK_ENV_NOT_CLOSED(self);
-
--#if (DBVER >= 42)
- MYDB_BEGIN_ALLOW_THREADS;
- self->db_env->get_home(self->db_env, &home);
- MYDB_END_ALLOW_THREADS;
--#else
-- home=self->db_env->db_home;
--#endif
-
- if (home == NULL) {
- RETURN_NONE();
-@@ -9298,10 +9259,25 @@ bsddb_version(PyObject* self)
- {
- int major, minor, patch;
-
-+ /* This should be instantaneous, no need to release the GIL */
- db_version(&major, &minor, &patch);
- return Py_BuildValue("(iii)", major, minor, patch);
- }
-
-+#if (DBVER >= 50)
-+static PyObject*
-+bsddb_version_full(PyObject* self)
-+{
-+ char *version_string;
-+ int family, release, major, minor, patch;
-+
-+ /* This should be instantaneous, no need to release the GIL */
-+ version_string = db_full_version(&family, &release, &major, &minor, &patch);
-+ return Py_BuildValue("(siiiii)",
-+ version_string, family, release, major, minor, patch);
-+}
-+#endif
-+
-
- /* List of functions defined in the module */
- static PyMethodDef bsddb_methods[] = {
-@@ -9311,6 +9287,9 @@ static PyMethodDef bsddb_methods[] = {
- {"DBSequence", (PyCFunction)DBSequence_construct, METH_VARARGS | METH_KEYWORDS },
- #endif
- {"version", (PyCFunction)bsddb_version, METH_NOARGS, bsddb_version_doc},
-+#if (DBVER >= 50)
-+ {"full_version", (PyCFunction)bsddb_version_full, METH_NOARGS},
-+#endif
- {NULL, NULL} /* sentinel */
- };
-
-@@ -9328,6 +9307,11 @@ static BSDDB_api bsddb_api;
- */
- #define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME)
-
-+/*
-+** We can rename the module at import time, so the string allocated
-+** must be big enough, and any use of the name must use this particular
-+** string.
-+*/
- #define MODULE_NAME_MAX_LEN 11
- static char _bsddbModuleName[MODULE_NAME_MAX_LEN+1] = "_bsddb";
-
-@@ -9428,16 +9412,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_MAX_RECORDS);
-
- #if (DBVER < 48)
--#if (DBVER >= 42)
- ADD_INT(d, DB_RPCCLIENT);
--#else
-- ADD_INT(d, DB_CLIENT);
-- /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */
-- _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
--#endif
- #endif
-
--#if (DBVER < 48)
-+#if (DBVER < 48 || DBVER > 51)
- ADD_INT(d, DB_XA_CREATE);
- #endif
-
-@@ -9477,6 +9455,14 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_TXN_SYNC);
- ADD_INT(d, DB_TXN_NOWAIT);
-
-+#if (DBVER >= 51)
-+ ADD_INT(d, DB_TXN_BULK);
-+#endif
-+
-+#if (DBVER >= 48)
-+ ADD_INT(d, DB_CURSOR_BULK);
-+#endif
-+
- #if (DBVER >= 46)
- ADD_INT(d, DB_TXN_WAIT);
- #endif
-@@ -9561,9 +9547,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_ARCH_ABS);
- ADD_INT(d, DB_ARCH_DATA);
- ADD_INT(d, DB_ARCH_LOG);
--#if (DBVER >= 42)
- ADD_INT(d, DB_ARCH_REMOVE);
--#endif
-
- ADD_INT(d, DB_BTREE);
- ADD_INT(d, DB_HASH);
-@@ -9591,9 +9575,6 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_CACHED_COUNTS);
- #endif
-
--#if (DBVER <= 41)
-- ADD_INT(d, DB_COMMIT);
--#endif
- ADD_INT(d, DB_CONSUME);
- ADD_INT(d, DB_CONSUME_WAIT);
- ADD_INT(d, DB_CURRENT);
-@@ -9651,8 +9632,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_LOCK_DEADLOCK);
- ADD_INT(d, DB_LOCK_NOTGRANTED);
- ADD_INT(d, DB_NOSERVER);
-+#if (DBVER < 52)
- ADD_INT(d, DB_NOSERVER_HOME);
- ADD_INT(d, DB_NOSERVER_ID);
-+#endif
- ADD_INT(d, DB_NOTFOUND);
- ADD_INT(d, DB_OLD_VERSION);
- ADD_INT(d, DB_RUNRECOVERY);
-@@ -9671,6 +9654,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- #if (DBVER >= 43)
- ADD_INT(d, DB_STAT_SUBSYSTEM);
- ADD_INT(d, DB_STAT_MEMP_HASH);
-+ ADD_INT(d, DB_STAT_LOCK_CONF);
-+ ADD_INT(d, DB_STAT_LOCK_LOCKERS);
-+ ADD_INT(d, DB_STAT_LOCK_OBJECTS);
-+ ADD_INT(d, DB_STAT_LOCK_PARAMS);
- #endif
-
- #if (DBVER >= 48)
-@@ -9690,7 +9677,6 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_EID_INVALID);
- ADD_INT(d, DB_EID_BROADCAST);
-
--#if (DBVER >= 42)
- ADD_INT(d, DB_TIME_NOTGRANTED);
- ADD_INT(d, DB_TXN_NOT_DURABLE);
- ADD_INT(d, DB_TXN_WRITE_NOSYNC);
-@@ -9698,9 +9684,8 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_INIT_REP);
- ADD_INT(d, DB_ENCRYPT);
- ADD_INT(d, DB_CHKSUM);
--#endif
-
--#if (DBVER >= 42) && (DBVER < 47)
-+#if (DBVER < 47)
- ADD_INT(d, DB_LOG_AUTOREMOVE);
- ADD_INT(d, DB_DIRECT_LOG);
- #endif
-@@ -9733,6 +9718,20 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_VERB_REPLICATION);
- ADD_INT(d, DB_VERB_WAITSFOR);
-
-+#if (DBVER >= 50)
-+ ADD_INT(d, DB_VERB_REP_SYSTEM);
-+#endif
-+
-+#if (DBVER >= 47)
-+ ADD_INT(d, DB_VERB_REP_ELECT);
-+ ADD_INT(d, DB_VERB_REP_LEASE);
-+ ADD_INT(d, DB_VERB_REP_MISC);
-+ ADD_INT(d, DB_VERB_REP_MSGS);
-+ ADD_INT(d, DB_VERB_REP_SYNC);
-+ ADD_INT(d, DB_VERB_REPMGR_CONNFAIL);
-+ ADD_INT(d, DB_VERB_REPMGR_MISC);
-+#endif
-+
- #if (DBVER >= 45)
- ADD_INT(d, DB_EVENT_PANIC);
- ADD_INT(d, DB_EVENT_REP_CLIENT);
-@@ -9748,16 +9747,25 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_EVENT_WRITE_FAILED);
- #endif
-
-+#if (DBVER >= 50)
-+ ADD_INT(d, DB_REPMGR_CONF_ELECTIONS);
-+ ADD_INT(d, DB_EVENT_REP_MASTER_FAILURE);
-+ ADD_INT(d, DB_EVENT_REP_DUPMASTER);
-+ ADD_INT(d, DB_EVENT_REP_ELECTION_FAILED);
-+#endif
-+#if (DBVER >= 48)
-+ ADD_INT(d, DB_EVENT_REG_ALIVE);
-+ ADD_INT(d, DB_EVENT_REG_PANIC);
-+#endif
-+
- ADD_INT(d, DB_REP_DUPMASTER);
- ADD_INT(d, DB_REP_HOLDELECTION);
- #if (DBVER >= 44)
- ADD_INT(d, DB_REP_IGNORE);
- ADD_INT(d, DB_REP_JOIN_FAILURE);
- #endif
--#if (DBVER >= 42)
- ADD_INT(d, DB_REP_ISPERM);
- ADD_INT(d, DB_REP_NOTPERM);
--#endif
- ADD_INT(d, DB_REP_NEWSITE);
-
- ADD_INT(d, DB_REP_MASTER);
-@@ -9766,7 +9774,13 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_REP_PERMANENT);
-
- #if (DBVER >= 44)
-+#if (DBVER >= 50)
-+ ADD_INT(d, DB_REP_CONF_AUTOINIT);
-+#else
- ADD_INT(d, DB_REP_CONF_NOAUTOINIT);
-+#endif /* 5.0 */
-+#endif /* 4.4 */
-+#if (DBVER >= 44)
- ADD_INT(d, DB_REP_CONF_DELAYCLIENT);
- ADD_INT(d, DB_REP_CONF_BULK);
- ADD_INT(d, DB_REP_CONF_NOWAIT);
-@@ -9774,9 +9788,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_REP_REREQUEST);
- #endif
-
--#if (DBVER >= 42)
- ADD_INT(d, DB_REP_NOBUFFER);
--#endif
-
- #if (DBVER >= 46)
- ADD_INT(d, DB_REP_LEASE_EXPIRED);
-@@ -9819,6 +9831,28 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_STAT_ALL);
- #endif
-
-+#if (DBVER >= 51)
-+ ADD_INT(d, DB_REPMGR_ACKS_ALL_AVAILABLE);
-+#endif
-+
-+#if (DBVER >= 48)
-+ ADD_INT(d, DB_REP_CONF_INMEM);
-+#endif
-+
-+ ADD_INT(d, DB_TIMEOUT);
-+
-+#if (DBVER >= 50)
-+ ADD_INT(d, DB_FORCESYNC);
-+#endif
-+
-+#if (DBVER >= 48)
-+ ADD_INT(d, DB_FAILCHK);
-+#endif
-+
-+#if (DBVER >= 51)
-+ ADD_INT(d, DB_HOTBACKUP_IN_PROGRESS);
-+#endif
-+
- #if (DBVER >= 43)
- ADD_INT(d, DB_BUFFER_SMALL);
- ADD_INT(d, DB_SEQ_DEC);
-@@ -9856,6 +9890,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- ADD_INT(d, DB_SET_LOCK_TIMEOUT);
- ADD_INT(d, DB_SET_TXN_TIMEOUT);
-
-+#if (DBVER >= 48)
-+ ADD_INT(d, DB_SET_REG_TIMEOUT);
-+#endif
-+
- /* The exception name must be correct for pickled exception *
- * objects to unpickle properly. */
- #ifdef PYBSDDB_STANDALONE /* different value needed for standalone pybsddb */
-@@ -9912,8 +9950,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- MAKE_EX(DBRunRecoveryError);
- MAKE_EX(DBVerifyBadError);
- MAKE_EX(DBNoServerError);
-+#if (DBVER >= 44 && DBVER < 52)
- MAKE_EX(DBNoServerHomeError);
- MAKE_EX(DBNoServerIDError);
-+#endif
- MAKE_EX(DBPageNotFoundError);
- MAKE_EX(DBSecondaryBadError);
-
-@@ -9927,9 +9967,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- MAKE_EX(DBNoSuchFileError);
- MAKE_EX(DBPermissionsError);
-
--#if (DBVER >= 42)
- MAKE_EX(DBRepHandleDeadError);
--#endif
- #if (DBVER >= 44)
- MAKE_EX(DBRepLockoutError);
- #endif
-@@ -9947,6 +9985,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- #undef MAKE_EX
-
- /* Initialise the C API structure and add it to the module */
-+ bsddb_api.api_version = PYBSDDB_API_VERSION;
- bsddb_api.db_type = &DB_Type;
- bsddb_api.dbcursor_type = &DBCursor_Type;
- bsddb_api.dblogcursor_type = &DBLogCursor_Type;
-@@ -9955,19 +9994,25 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */
- bsddb_api.dblock_type = &DBLock_Type;
- #if (DBVER >= 43)
- bsddb_api.dbsequence_type = &DBSequence_Type;
-+#else
-+ bsddb_api.dbsequence_type = NULL;
- #endif
- bsddb_api.makeDBError = makeDBError;
-
- /*
-- ** Capsules exist from Python 3.1, but I
-- ** don't want to break the API compatibility
-- ** for already published Python versions.
-+ ** Capsules exist from Python 2.7 and 3.1.
-+ ** We don't support Python 3.0 anymore, so...
-+ ** #if (PY_VERSION_HEX < ((PY_MAJOR_VERSION < 3) ? 0x02070000 : 0x03020000))
- */
--#if (PY_VERSION_HEX < 0x03020000)
-+#if (PY_VERSION_HEX < 0x02070000)
- py_api = PyCObject_FromVoidPtr((void*)&bsddb_api, NULL);
- #else
- {
-- char py_api_name[250];
-+ /*
-+ ** The data must outlive the call!!. So, the static definition.
-+ ** The buffer must be big enough...
-+ */
-+ static char py_api_name[MODULE_NAME_MAX_LEN+10];
-
- strcpy(py_api_name, _bsddbModuleName);
- strcat(py_api_name, ".api");
-diff --git a/Modules/bsddb.h b/Modules/bsddb.h
-index a3a687b..c1d862a 100644
---- a/Modules/bsddb.h
-+++ b/Modules/bsddb.h
-@@ -109,7 +109,7 @@
- #error "eek! DBVER can't handle minor versions > 9"
- #endif
-
--#define PY_BSDDB_VERSION "4.8.4.2"
-+#define PY_BSDDB_VERSION "5.3.15"
-
- /* Python object definitions */
-
-@@ -236,7 +236,7 @@ typedef struct DBSequenceObject {
- /* To access the structure from an external module, use code like the
- following (error checking missed out for clarity):
-
-- // If you are using Python before 3.2:
-+ // If you are using Python before 2.7:
- BSDDB_api* bsddb_api;
- PyObject* mod;
- PyObject* cobj;
-@@ -249,7 +249,7 @@ typedef struct DBSequenceObject {
- Py_DECREF(mod);
-
-
-- // If you are using Python 3.2 or up:
-+ // If you are using Python 2.7 or up: (except Python 3.0, unsupported)
- BSDDB_api* bsddb_api;
-
- // Use "bsddb3._pybsddb.api" if you're using
-@@ -257,10 +257,14 @@ typedef struct DBSequenceObject {
- bsddb_api = (void **)PyCapsule_Import("bsddb._bsddb.api", 1);
-
-
-+ Check "api_version" number before trying to use the API.
-+
- The structure's members must not be changed.
- */
-
-+#define PYBSDDB_API_VERSION 1
- typedef struct {
-+ unsigned int api_version;
- /* Type objects */
- PyTypeObject* db_type;
- PyTypeObject* dbcursor_type;
-@@ -268,9 +272,7 @@ typedef struct {
- PyTypeObject* dbenv_type;
- PyTypeObject* dbtxn_type;
- PyTypeObject* dblock_type;
--#if (DBVER >= 43)
-- PyTypeObject* dbsequence_type;
--#endif
-+ PyTypeObject* dbsequence_type; /* If DBVER < 43 -> NULL */
-
- /* Functions */
- int (*makeDBError)(int err);
-@@ -289,9 +291,9 @@ typedef struct {
- #define DBEnvObject_Check(v) ((v)->ob_type == bsddb_api->dbenv_type)
- #define DBTxnObject_Check(v) ((v)->ob_type == bsddb_api->dbtxn_type)
- #define DBLockObject_Check(v) ((v)->ob_type == bsddb_api->dblock_type)
--#if (DBVER >= 43)
--#define DBSequenceObject_Check(v) ((v)->ob_type == bsddb_api->dbsequence_type)
--#endif
-+#define DBSequenceObject_Check(v) \
-+ ((bsddb_api->dbsequence_type) && \
-+ ((v)->ob_type == bsddb_api->dbsequence_type))
-
- #endif /* COMPILING_BSDDB_C */
-
-diff --git a/setup.py b/setup.py
-index 6b47451..e8ac96c 100644
---- a/setup.py
-+++ b/setup.py
-@@ -799,7 +799,7 @@ class PyBuildExt(build_ext):
- # a release. Most open source OSes come with one or more
- # versions of BerkeleyDB already installed.
-
-- max_db_ver = (4, 8)
-+ max_db_ver = (5, 3)
- min_db_ver = (4, 1)
- db_setup_debug = False # verbose debug prints from this script?
-
-@@ -821,7 +821,11 @@ class PyBuildExt(build_ext):
- return True
-
- def gen_db_minor_ver_nums(major):
-- if major == 4:
-+ if major == 5:
-+ for x in range(max_db_ver[1]+1):
-+ if allow_db_ver((5, x)):
-+ yield x
-+ elif major == 4:
- for x in range(max_db_ver[1]+1):
- if allow_db_ver((4, x)):
- yield x
-@@ -835,6 +839,9 @@ class PyBuildExt(build_ext):
- # construct a list of paths to look for the header file in on
- # top of the normal inc_dirs.
- db_inc_paths = [
-+ '/usr/include/db5',
-+ '/usr/local/include/db5',
-+ '/opt/sfw/include/db5',
- '/usr/include/db4',
- '/usr/local/include/db4',
- '/opt/sfw/include/db4',
-@@ -845,6 +852,16 @@ class PyBuildExt(build_ext):
- '/sw/include/db4',
- '/sw/include/db3',
- ]
-+ # 5.x minor number specific paths
-+ for x in gen_db_minor_ver_nums(5):
-+ db_inc_paths.append('/usr/include/db5%d' % x)
-+ db_inc_paths.append('/usr/include/db5.%d' % x)
-+ db_inc_paths.append('/usr/local/BerkeleyDB.5.%d/include' % x)
-+ db_inc_paths.append('/usr/local/include/db5%d' % x)
-+ db_inc_paths.append('/pkg/db-5.%d/include' % x)
-+ db_inc_paths.append('/opt/db-5.%d/include' % x)
-+ # MacPorts default (http://www.macports.org/)
-+ db_inc_paths.append('/opt/local/include/db5%d' % x)
- # 4.x minor number specific paths
- for x in gen_db_minor_ver_nums(4):
- db_inc_paths.append('/usr/include/db4%d' % x)
-@@ -871,6 +888,10 @@ class PyBuildExt(build_ext):
- for dn in inc_dirs:
- std_variants.append(os.path.join(dn, 'db3'))
- std_variants.append(os.path.join(dn, 'db4'))
-+ std_variants.append(os.path.join(dn, 'db5'))
-+ for x in gen_db_minor_ver_nums(5):
-+ std_variants.append(os.path.join(dn, "db5%d"%x))
-+ std_variants.append(os.path.join(dn, "db5.%d"%x))
- for x in gen_db_minor_ver_nums(4):
- std_variants.append(os.path.join(dn, "db4%d"%x))
- std_variants.append(os.path.join(dn, "db4.%d"%x))
---
-1.7.7
-
diff --git a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
deleted file mode 100644
index b84f8c3461..0000000000
--- a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-python: fix build error with Readline 6.3
-
-Backport two patches from upstream:
-
-use new readline function types (closes #20374)
-Issue #20374: Avoid compiler warnings when compiling readline with libedit.
-
-Upstream-Status: Backport
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- Modules/readline.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/Modules/readline.c b/Modules/readline.c
-index b5e258d..d3f52aa 100644
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -735,15 +735,24 @@ on_hook(PyObject *func)
- return result;
- }
-
-+
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_startup_hook(void)
-+#else
-+on_startup_hook()
-+#endif
- {
- return on_hook(startup_hook);
- }
-
- #ifdef HAVE_RL_PRE_INPUT_HOOK
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_pre_input_hook(void)
-+#else
-+on_pre_input_hook()
-+#endif
- {
- return on_hook(pre_input_hook);
- }
-@@ -886,12 +895,12 @@ setup_readline(void)
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (Function *)on_startup_hook;
-+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (Function *)on_pre_input_hook;
-+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
- /* Set Python word break characters */
- rl_completer_word_break_characters =
- strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
deleted file mode 100644
index 2d35520a6d..0000000000
--- a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-python: Building without SSLv3 support
-
-Building without SSLv3 support when openssl is built
-without any support for SSLv3
-
-Upstream-Status: Backport
-
-Reference:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76A8611#22
-
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
-diff -ruN a/Modules/_ssl.c b/Modules/_ssl.c
---- a/Modules/_ssl.c 2014-11-26 07:43:58.755679939 +0100
-+++ b/Modules/_ssl.c 2014-11-26 07:49:10.454182400 +0100
-@@ -302,8 +302,10 @@
- PySSL_BEGIN_ALLOW_THREADS
- if (proto_version == PY_SSL_VERSION_TLS1)
- self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
-+#ifndef OPENSSL_NO_SSL3
- else if (proto_version == PY_SSL_VERSION_SSL3)
- self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
-+#endif
- #ifndef OPENSSL_NO_SSL2
- else if (proto_version == PY_SSL_VERSION_SSL2)
- self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
-@@ -1777,8 +1779,10 @@
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
- PY_SSL_VERSION_SSL2);
- #endif
-+#ifndef OPENSSL_NO_SSL3
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
- PY_SSL_VERSION_SSL3);
-+#endif
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
- PY_SSL_VERSION_SSL23);
- PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
diff --git a/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch b/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch
deleted file mode 100644
index 4ec627ea51..0000000000
--- a/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-This patch removes the RPATH setting which contains a pointer to
-the target relocated sysroot, which is incorrect.
-
-Upstream-Status: Inappropriate [Embedded Specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: Python-2.6.6/setup.py
-===================================================================
---- Python-2.6.6.orig/setup.py 2011-09-28 14:22:57.000000000 -0700
-+++ Python-2.6.6/setup.py 2011-09-28 16:11:25.147279633 -0700
-@@ -1079,7 +1079,6 @@
- include_dirs=["Modules/_sqlite",
- sqlite_incdir],
- library_dirs=sqlite_libdir,
-- runtime_library_dirs=sqlite_libdir,
- extra_link_args=sqlite_extra_link_args,
- libraries=["sqlite3",]))
- else:
diff --git a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
index 0c1f1741cb..dacb552ec7 100644
--- a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
+++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch
@@ -6,26 +6,21 @@ Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300
-+++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300
-@@ -1141,12 +1141,12 @@
+
+diff --git a/setup.py b/setup.py
+index b887808..ae51607 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext):
# the more recent berkeleydb's db.h file first in the include path
# when attempting to compile and it will fail.
f = "/usr/include/db.h"
--
+ if len(inc_dirs) != 0:
+ f = os.path.join(inc_dirs[0], "db.h")
- if sys.platform == 'darwin':
+
+ if host_platform == 'darwin':
if is_macosx_sdk_path(f):
- sysroot = macosx_sdk_root()
- f = os.path.join(sysroot, f[1:])
--
- if os.path.exists(f) and not db_incs:
- data = open(f).read()
- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
-@@ -1161,8 +1161,10 @@
+@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext):
libraries=libraries))
else:
exts.append(Extension('bsddb185', ['bsddbmodule.c']))
diff --git a/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
new file mode 100644
index 0000000000..2c657861c8
--- /dev/null
+++ b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
@@ -0,0 +1,20 @@
+Python tries to use ncursesw from the host,
+if it is not found causes an error on configure,
+we should use ncursesw from sysroot instead
+
+
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: Python-2.7.9/configure.ac
+===================================================================
+--- Python-2.7.9.orig/configure.ac
++++ Python-2.7.9/configure.ac
+@@ -4311,7 +4311,7 @@ fi
+
+ # first curses configure check
+ ac_save_cppflags="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
++CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw"
+
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+
diff --git a/meta/recipes-devtools/python/python3-native_3.3.3.bb b/meta/recipes-devtools/python/python3-native_3.3.3.bb
index 9ae2a0b373..73ce0952bd 100644
--- a/meta/recipes-devtools/python/python3-native_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.3.3.bb
@@ -27,6 +27,8 @@ file://fix-ast.h-dependency.patch \
file://makerace.patch \
${DISTRO_SRC_URI} \
file://python3-fix-build-error-with-Readline-6.3.patch \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
diff --git a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
index 8b6476037f..2bc8b8c460 100644
--- a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
@@ -26,7 +26,8 @@ index f020b28..e8339cd 100644
self.add_gcc_paths()
- if not cross_compiling:
self.add_multiarch_paths()
-
+
# Add paths specified in the environment variables LDFLAGS and
---
+--
2.0.0
+
diff --git a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
index bf0a56f220..74490d93a5 100644
--- a/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
+++ b/meta/recipes-devtools/python/python3/python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -15,13 +15,14 @@ index 989baf9..2890c96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ if test "$cross_compiling" = yes; then
- AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
- fi
+ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ fi
AC_MSG_RESULT($interp)
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH) '$interp
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
---
+--
2.0.1
+
diff --git a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
new file mode 100644
index 0000000000..fc2e12dfe5
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch
@@ -0,0 +1,50 @@
+From 8dad810f3a3d073f09ad72e1a3ee0a895eab2ca1 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 19:05:36 -0800
+Subject: [PATCH] setup.py:check cross_compiling when get FLAGS
+
+Fixed when compile target pythnon3:
+gcc -isystem/path/to/sysroots/x86_64-linux/usr/include \
+ -L=/path/to/sysroots/x86_64-linux/usr/lib
+
+This is incorrect, the native sysroot should not be used by target
+python3.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ setup.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index e8339cd..83fd31f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -238,7 +238,10 @@ class PyBuildExt(build_ext):
+ # unfortunately, distutils doesn't let us provide separate C and C++
+ # compilers
+ if compiler is not None:
+- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
++ if cross_compiling:
++ (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '')
++ else:
++ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+ self.compiler.set_executables(**args)
+
+@@ -457,7 +460,10 @@ class PyBuildExt(build_ext):
+ ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+ ('LDFLAGS', '-L', self.compiler.library_dirs),
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+- env_val = sysconfig.get_config_var(env_var)
++ if cross_compiling:
++ env_val = os.environ.get(env_var)
++ else:
++ env_val = sysconfig.get_config_var(env_var)
+ if env_val:
+ # To prevent optparse from raising an exception about any
+ # options in env_val that it doesn't know about we strip out
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
new file mode 100644
index 0000000000..de07643f2b
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/sysconfig.py-add-_PYTHON_PROJECT_SRC.patch
@@ -0,0 +1,54 @@
+From fc93b3cc23b4f9698ae92a42986dbb02b6f19588 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 18 Jan 2015 06:29:50 -0800
+Subject: [PATCH] sysconfig.py: add _PYTHON_PROJECT_SRC
+
+python3 has introduced _PYTHON_PROJECT_BASE which is used for separate B
+and S, but it doesn't work when compile Modules, the target python3 runs
+python3-native's sysconfig to get srcdir which is the native's, there
+would be errors when native's srcdir has been removed, add
+_PYTHON_PROJECT_SRC to fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Lib/distutils/sysconfig.py | 5 ++++-
+ Lib/sysconfig.py | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index a545ab9..74317d1 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -554,7 +554,10 @@ def get_config_vars(*args):
+ _config_vars['exec_prefix'] = EXEC_PREFIX
+
+ # Always convert srcdir to an absolute path
+- srcdir = _config_vars.get('srcdir', project_base)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _config_vars.get('srcdir', project_base)
+ if os.name == 'posix':
+ if python_build:
+ # If srcdir is a relative path (typically '.' or '..')
+diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
+index 7287f11..cc92998 100644
+--- a/Lib/sysconfig.py
++++ b/Lib/sysconfig.py
+@@ -562,7 +562,10 @@ def get_config_vars(*args):
+ _CONFIG_VARS['userbase'] = _getuserbase()
+
+ # Always convert srcdir to an absolute path
+- srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
++ if "_PYTHON_PROJECT_SRC" in os.environ:
++ srcdir = os.path.abspath(os.environ["_PYTHON_PROJECT_SRC"])
++ else:
++ srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
+ if os.name == 'posix':
+ if _PYTHON_BUILD:
+ # If srcdir is a relative path (typically '.' or '..')
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/python/python3_3.3.3.bb b/meta/recipes-devtools/python/python3_3.3.3.bb
index 2c1f63f5b8..6147408937 100644
--- a/meta/recipes-devtools/python/python3_3.3.3.bb
+++ b/meta/recipes-devtools/python/python3_3.3.3.bb
@@ -39,6 +39,8 @@ SRC_URI += "\
file://avoid-ncursesw-include-path.patch \
file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
file://python3-setup.py-no-host-headers-libs.patch \
+ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
"
SRC_URI[md5sum] = "f3ebe34d4d8695bf889279b54673e10c"
SRC_URI[sha256sum] = "e526e9b612f623888364d30cc9f3dfc34dcef39065c713bdbcddf47df84d8dcb"
@@ -66,6 +68,10 @@ TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
EXTRA_OEMAKE += "CROSS_COMPILE=yes"
EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/"
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+
# No ctypes option for python 3
PYTHONLSBOPTS = ""
@@ -76,7 +82,7 @@ do_configure_prepend() {
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux*
+ cd ${S}/Lib/plat-linux*
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -107,8 +113,6 @@ do_compile() {
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -135,8 +139,6 @@ do_install() {
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
install -d ${D}${libdir}/pkgconfig
install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.9.bb
index cbe8d7f980..7918550eae 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.9.bb
@@ -1,19 +1,16 @@
require python.inc
-DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.3"
+DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+PR = "${INC_PR}"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
SRC_URI += "\
file://01-use-proper-tools-for-cross-build.patch \
file://03-fix-tkinter-detection.patch \
- file://05-enable-ctypes-cross-build.patch \
- file://06-ctypes-libffi-fix-configure.patch \
file://06-avoid_usr_lib_termcap_path_in_linking.patch \
${DISTRO_SRC_URI} \
file://multilib.patch \
file://cgi_py.patch \
- file://remove_sqlite_rpath.patch \
file://setup_py_skip_cross_import_check.patch \
file://add-md5module-support.patch \
file://host_include_contamination.patch \
@@ -23,45 +20,36 @@ SRC_URI += "\
file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
file://avoid_warning_about_tkinter.patch \
file://avoid_warning_for_sunos_specific_module.patch \
- file://python-2.7.3-berkeley-db-5.3.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
- file://builddir.patch \
- file://python-2.7.3-CVE-2012-2135.patch \
- file://gcc-4.8-fix-configure-Wformat.patch \
file://fix-makefile-for-ptest.patch \
file://run-ptest \
- file://CVE-2013-4073_py27.patch \
- file://pypirc-secure.patch \
file://parallel-makeinst-create-bindir.patch \
- file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \
- file://python-fix-build-error-with-Readline-6.3.patch \
- file://python-2.7.3-CVE-2014-1912.patch \
- file://json-flaw-fix.patch \
- file://posix_close.patch \
- file://python-2.7.3-CVE-2014-7185.patch \
- file://python2.7.3-nossl3.patch \
+ file://use_sysroot_ncurses_instead_of_host.patch \
+ file://avoid_parallel_make_races_on_pgen.patch \
"
S = "${WORKDIR}/Python-${PV}"
inherit autotools multilib_header python-dir pythonnative
+CONFIGUREOPTS += " --with-system-ffi "
+
# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
# The following is a hack until we drop ac_cv_sizeof_off_t from site files
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)} ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-do_configure_prepend() {
+do_configure_append() {
rm -f ${S}/Makefile.orig
- autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
}
do_compile() {
# regenerate platform specific files, because they depend on system headers
- cd Lib/plat-linux2
+ cd ${S}/Lib/plat-linux2
include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
${S}/Tools/scripts/h2py.py -i '(u_long)' \
${STAGING_INCDIR}/dlfcn.h \
@@ -93,7 +81,7 @@ do_compile() {
install -m 0644 Makefile Makefile.sysroot
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
@@ -110,7 +98,7 @@ do_install() {
install -m 0644 Makefile.orig Makefile
export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${S}"
+ export PYTHONBUILDDIR="${B}"
# After swizzling the makefile, we need to run the build again.
# install can race with the build so we have to run this first, then install
diff --git a/meta/recipes-devtools/qemu/files/0001-Back-porting-security-fix-CVE-2014-5388.patch b/meta/recipes-devtools/qemu/files/0001-Back-porting-security-fix-CVE-2014-5388.patch
deleted file mode 100644
index ec541fa668..0000000000
--- a/meta/recipes-devtools/qemu/files/0001-Back-porting-security-fix-CVE-2014-5388.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Prevent out-of-bounds array access on
-acpi_pcihp_pci_status.
-
-Upstream-Status: Backport
-
-Signed-off-by: Gonglei <arei.gonglei@huawei.com>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
----
-v2:
- - change commit message.
- - add 'Reviewed-by'
----
- hw/acpi/pcihp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
-index fae663a..34dedf1 100644
---- a/hw/acpi/pcihp.c
-+++ b/hw/acpi/pcihp.c
-@@ -231,7 +231,7 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size)
- uint32_t val = 0;
- int bsel = s->hotplug_select;
-
-- if (bsel < 0 || bsel > ACPI_PCIHP_MAX_HOTPLUG_BUS) {
-+ if (bsel < 0 || bsel >= ACPI_PCIHP_MAX_HOTPLUG_BUS) {
- return 0;
- }
-
---
-1.7.12.4
diff --git a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
index 7f1c5a9058..b0c2ea5be9 100644
--- a/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ b/meta/recipes-devtools/qemu/files/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
@@ -14,6 +14,10 @@ Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
Updated it on 2014-01-15 for rebasing
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Update it when upgrade qemu to 2.2.0
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
hw/arm/versatilepb.c | 6 ++++++
1 file changed, 6 insertions(+)
@@ -22,7 +26,7 @@ diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index b48d84c..ad2cd5a 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
-@@ -199,6 +199,12 @@ static void versatile_init(QEMUMachineInitArgs *args, int board_id)
+@@ -198,6 +198,12 @@ static void versatile_init(MachineState *machine, int board_id)
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
@@ -32,9 +36,9 @@ index b48d84c..ad2cd5a 100644
+ ((unsigned int)ram_size / (1 << 20)));
+ exit(1);
+ }
- memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size);
+ memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size,
+ &error_abort);
vmstate_register_ram_global(ram);
- /* ??? RAM should repeat to fill physical memory space. */
--
1.7.10.4
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index c9a5d328f9..4225db7573 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -5,9 +5,11 @@ DEPENDS = "glib-2.0 zlib pixman"
RDEPENDS_${PN}_class-target += "bash python"
require qemu-targets.inc
-inherit autotools-brokensep
+inherit autotools
BBCLASSEXTEND = "native nativesdk"
+PR = "r1"
+
# QEMU_TARGETS is overridable variable
QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
@@ -37,13 +39,13 @@ do_configure_prepend_class-native() {
fi
# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
}
do_configure_prepend_class-nativesdk() {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "" ] ; then
# Undo the -lX11 added by linker-flags.patch
- sed -i 's/-lX11//g' Makefile.target
+ sed -i 's/-lX11//g' ${S}/Makefile.target
fi
}
@@ -84,7 +86,10 @@ do_install_append() {
}
# END of qemu-mips workaround
-PACKAGECONFIG ??= "fdt sdl alsa"
+PACKAGECONFIG ??= " \
+ fdt sdl alsa \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen', '', d)} \
+ "
PACKAGECONFIG_class-native ??= "fdt alsa"
PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
NATIVEDEPS = ""
@@ -93,7 +98,7 @@ PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl ${NATIVEDEPS},"
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
-PACKAGECONFIG[xen] = "--enable-xen, --disable-xen,,"
+PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenctrl xen-libxenguest"
PACKAGECONFIG[quorum] = "--enable-quorum, --disable-quorum, gnutls,"
PACKAGECONFIG[vnc-tls] = "--enable-vnc --enable-vnc-tls,--disable-vnc-tls, gnutls,"
PACKAGECONFIG[vnc-ws] = "--enable-vnc --enable-vnc-ws,--disable-vnc-ws, gnutls,"
diff --git a/meta/recipes-devtools/qemu/qemu/37ed3bf1ee07bb1a26adca0df8718f601f231c0b.patch b/meta/recipes-devtools/qemu/qemu/37ed3bf1ee07bb1a26adca0df8718f601f231c0b.patch
new file mode 100644
index 0000000000..8609e3fe99
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/37ed3bf1ee07bb1a26adca0df8718f601f231c0b.patch
@@ -0,0 +1,59 @@
+Without this patch, x86_64 images would show invalid EDSCA key errors
+with sshd from openssh (but not dropbear) during init.
+
+This would cause problems with operation with some distros where EDSCA
+keys were mandatory. The issue was present in qemu 2.2.1 and not in
+2.3.0-rc0, bisected to this commit which was then backported.
+
+From 37ed3bf1ee07bb1a26adca0df8718f601f231c0b Mon Sep 17 00:00:00 2001
+From: Richard Henderson <rth@twiddle.net>
+Date: Fri, 20 Feb 2015 11:13:50 -0800
+Subject: [PATCH] tcg: Complete handling of ALWAYS and NEVER
+
+Missing from movcond
+
+Signed-off-by: Richard Henderson <rth@twiddle.net>
+---
+ tcg/tcg-op.c | 22 +++++++++++++++++-----
+ 1 files changed, 17 insertions(+), 5 deletions(-)
+
+Upstream-Status: Backport
+RP 2015/3/24
+
+Index: qemu-2.2.0/tcg/tcg-op.h
+===================================================================
+--- qemu-2.2.0.orig/tcg/tcg-op.h
++++ qemu-2.2.0/tcg/tcg-op.h
+@@ -2186,7 +2186,11 @@ static inline void tcg_gen_movcond_i32(T
+ TCGv_i32 c1, TCGv_i32 c2,
+ TCGv_i32 v1, TCGv_i32 v2)
+ {
+- if (TCG_TARGET_HAS_movcond_i32) {
++ if (cond == TCG_COND_ALWAYS) {
++ tcg_gen_mov_i32(ret, v1);
++ } else if (cond == TCG_COND_NEVER) {
++ tcg_gen_mov_i32(ret, v2);
++ } else if (TCG_TARGET_HAS_movcond_i32) {
+ tcg_gen_op6i_i32(INDEX_op_movcond_i32, ret, c1, c2, v1, v2, cond);
+ } else {
+ TCGv_i32 t0 = tcg_temp_new_i32();
+@@ -2205,6 +2209,11 @@ static inline void tcg_gen_movcond_i64(T
+ TCGv_i64 c1, TCGv_i64 c2,
+ TCGv_i64 v1, TCGv_i64 v2)
+ {
++ if (cond == TCG_COND_ALWAYS) {
++ tcg_gen_mov_i64(ret, v1);
++ } else if (cond == TCG_COND_NEVER) {
++ tcg_gen_mov_i64(ret, v2);
++ } else {
+ #if TCG_TARGET_REG_BITS == 32
+ TCGv_i32 t0 = tcg_temp_new_i32();
+ TCGv_i32 t1 = tcg_temp_new_i32();
+@@ -2246,6 +2255,7 @@ static inline void tcg_gen_movcond_i64(T
+ tcg_temp_free_i64(t1);
+ }
+ #endif
++ }
+ }
+
+ static inline void tcg_gen_add2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 al,
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
index fd1b4a6963..cd06aa4ac6 100644
--- a/meta/recipes-devtools/qemu/qemu/wacom.patch
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -1,7 +1,7 @@
The USB wacom device is missing a HID descriptor which causes it
to fail to operate with recent kernels (e.g. 3.17).
-This patch adds a HID desriptor to the device, based upon one from
+This patch adds a HID desriptor to the device, based upon one from
real wcom device.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@@ -16,12 +16,12 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
@@ -68,6 +68,89 @@
[STR_SERIALNUMBER] = "1",
};
-
+
+static const uint8_t qemu_tablet_hid_report_descriptor[] = {
+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
+ 0x09, 0x02, /* Usage (Mouse) */
+ 0xa1, 0x01, /* Collection (Application) */
-+ 0x85, 0x01, /* Report ID (1) */
++ 0x85, 0x01, /* Report ID (1) */
+ 0x09, 0x01, /* Usage (Pointer) */
+ 0xa1, 0x00, /* Collection (Physical) */
+ 0x05, 0x09, /* Usage Page (Button) */
@@ -48,7 +48,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
+ 0x05, 0x0d, /* Usage Page (Digitizer) */
+ 0x09, 0x01, /* Usage (Digitizer) */
+ 0xa1, 0x01, /* Collection (Application) */
-+ 0x85, 0x02, /* Report ID (2) */
++ 0x85, 0x02, /* Report ID (2) */
+ 0xa1, 0x00, /* Collection (Physical) */
+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
+ 0x09, 0x01, /* Usage (Digitizer) */
@@ -59,14 +59,14 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
+ 0xc0, /* End Collection */
+ 0x09, 0x01, /* Usage (Digitizer) */
-+ 0x85, 0x02, /* Report ID (2) */
++ 0x85, 0x02, /* Report ID (2) */
+ 0x95, 0x01, /* Report Count (1) */
+ 0xb1, 0x02, /* FEATURE (2) */
+ 0xc0, /* End Collection */
+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
+ 0x09, 0x01, /* Usage (Digitizer) */
+ 0xa1, 0x01, /* Collection (Application) */
-+ 0x85, 0x02, /* Report ID (2) */
++ 0x85, 0x02, /* Report ID (2) */
+ 0x05, 0x0d, /* Usage Page (Digitizer) */
+ 0x09, 0x22, /* Usage (Finger) */
+ 0xa1, 0x00, /* Collection (Physical) */
@@ -95,7 +95,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
+ 0x75, 0x08, /* Report Size (8) */
+ 0x95, 0x0d, /* Report Count (13) */
+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
-+ 0xc0, /* End Collection */
++ 0xc0, /* End Collection */
+ 0xc0, /* End Collection */
+};
+
@@ -114,7 +114,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
},
@@ -265,6 +350,15 @@
}
-
+
switch (request) {
+ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
+ switch (value >> 8) {
diff --git a/meta/recipes-devtools/qemu/qemu_2.1.0.bb b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
index a82d0529b9..757de89640 100644
--- a/meta/recipes-devtools/qemu/qemu_2.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.2.0.bb
@@ -6,22 +6,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
file://qemu-enlarge-env-entry-size.patch \
file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
- file://0001-Back-porting-security-fix-CVE-2014-5388.patch \
+ file://37ed3bf1ee07bb1a26adca0df8718f601f231c0b.patch \
"
SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "6726977292b448cbc7f89998fac6983b"
-SRC_URI[sha256sum] = "397e23184f4bf613589a8fe0c6542461dc2afdf17ed337e97e6fd2f31e8f8802"
+SRC_URI[md5sum] = "f7a5e2da22d057eb838a91da7aff43c8"
+SRC_URI[sha256sum] = "b68c9b6c7c694f5489b5a6bffe993cd976ffbb78e7d178eb3bc016caf460039c"
COMPATIBLE_HOST_class-target_mips64 = "null"
-do_sanitize_sources() {
- # These .git files point to a nonexistent path "../.git/modules" and will confuse git
- # if it tries to recurse into those directories.
- rm -f ${S}/dtc/.git ${S}/pixman/.git
-}
-
-addtask sanitize_sources after do_unpack before do_patch
-
do_install_append() {
# Prevent QA warnings about installed ${localstatedir}/run
if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index d2981b5575..959cd6fba0 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -9,7 +9,7 @@ do_install () {
echo "#!/bin/sh" > ${D}${bindir_crossscripts}/qemuwrapper
qemu_binary=${@qemu_target_binary(d)}
- qemu_options='${@d.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or d.getVar('QEMU_OPTIONS', True) or ""}'
+ qemu_options='${QEMU_OPTIONS}'
echo "$qemu_binary $qemu_options \"\$@\"" >> ${D}${bindir_crossscripts}/qemuwrapper
fallback_qemu_bin=
case $qemu_binary in
diff --git a/meta/recipes-devtools/quilt/quilt-native_0.63.bb b/meta/recipes-devtools/quilt/quilt-native_0.64.bb
index a089a83aba..6bc7dcdb7a 100644
--- a/meta/recipes-devtools/quilt/quilt-native_0.63.bb
+++ b/meta/recipes-devtools/quilt/quilt-native_0.64.bb
@@ -1,2 +1,2 @@
-require quilt-${PV}.inc
+require quilt.inc
require quilt-native.inc
diff --git a/meta/recipes-devtools/quilt/quilt-0.63.inc b/meta/recipes-devtools/quilt/quilt.inc
index 433d6b4089..ac7ef93e1e 100644
--- a/meta/recipes-devtools/quilt/quilt-0.63.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -10,8 +10,8 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
file://Makefile \
"
-SRC_URI[md5sum] = "c0ef4beb58a6fa72563b955e70624b6e"
-SRC_URI[sha256sum] = "2846788221aa8844c54f10239c7cbc5e88031859162bcc285449446c3cfffe52"
+SRC_URI[md5sum] = "fc0310db5868a0873d602d4332a76d43"
+SRC_URI[sha256sum] = "c4bfd3282214a288e8d3e921ae4d52e73e24c4fead72b5446752adee99a7affd"
inherit autotools-brokensep ptest
@@ -19,6 +19,8 @@ EXTRA_OECONF_darwin += "--without-date \
--without-getopt \
"
+CLEANBROKEN = "1"
+
PACKAGES += "guards guards-doc"
FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
${bindir}/quilt ${libdir}/quilt"
diff --git a/meta/recipes-devtools/quilt/quilt_0.63.bb b/meta/recipes-devtools/quilt/quilt_0.64.bb
index 3a08d13eaf..00f900a112 100644
--- a/meta/recipes-devtools/quilt/quilt_0.63.bb
+++ b/meta/recipes-devtools/quilt/quilt_0.64.bb
@@ -1,4 +1,4 @@
-require quilt-${PV}.inc
+require quilt.inc
inherit gettext
RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
SRC_URI += "file://aclocal.patch \
diff --git a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
index d8ecf0f7bd..23bc3361d9 100644
--- a/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
+++ b/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
@@ -36,13 +36,14 @@ index c35e0ab..016e8d1 100644
--- a/rpmdb/signature.c
+++ b/rpmdb/signature.c
@@ -529,7 +529,7 @@ int rpmCheckPassPhrase(const char * passPhrase)
- (void) setenv("GNUPGHOME", gpg_path, 1);
-
- cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
+ (void) setenv("GNUPGHOME", gpg_path, 1);
+
+ cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
- rc = argvSplit(&av, cmd, NULL);
+ rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
- if (!rc)
- rc = execve(av[0], (char *const *)av+1, environ);
-
---
+ if (!rc)
+ rc = execve(av[0], (char *const *)av+1, environ);
+
+--
1.9.1
+
diff --git a/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
new file mode 100644
index 0000000000..410623fab2
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/no-ldflags-in-pkgconfig.patch
@@ -0,0 +1,14 @@
+Don't put LDFLAGS into the Libs.private, all it generally contains is a linker
+hash selection (harmless) and the absolute path to the libdir in the sysroot
+(actively harmful).
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/scripts/rpm.pc.in b/scripts/rpm.pc.in
+index 8293471..2ea469c 100644
+--- a/scripts/rpm.pc.in
++++ b/scripts/rpm.pc.in
+@@ -17 +17 @@ Libs: -L${libdir} -lrpmbuild${suffix} -lrpm${suffix} -lrpmdb${suffix} -lrpmio${s
+-Libs.private: @LDFLAGS@ @LIBS@
++Libs.private: @LIBS@
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
index 58863774f6..d2d9b09845 100644
--- a/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
+++ b/meta/recipes-devtools/rpm/rpm/rpm-realpath.patch
@@ -14,11 +14,11 @@ diff -urpN a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c
@@ -257,7 +257,9 @@ int Open(const char * path, int flags, m
/* XXX if the open(2) fails, try to strip a possible chroot(2) prefix. */
if (fdno < 0 && errno == ENOENT) {
- const char *dbpath = rpmExpand("%{?_dbpath}/", NULL);
+ const char *dbpath = rpmExpand("%{?_dbpath}/", NULL);
- const char * fn = strstr(path + 1, dbpath);
+ char resolved_dbpath[PATH_MAX];
+ realpath(dbpath, resolved_dbpath);
+ const char * fn = strstr(path + 1, resolved_dbpath);
- if (fn)
- fdno = open(fn, flags, mode);
- dbpath = _free(dbpath);
+ if (fn)
+ fdno = open(fn, flags, mode);
+ dbpath = _free(dbpath);
diff --git a/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
index 86a14fae50..4e44bc4fec 100644
--- a/meta/recipes-devtools/rpm/rpm_4.11.2.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.11.2.bb
@@ -39,7 +39,9 @@ SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \
SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4"
-inherit autotools-brokensep
+PR = "r1"
+
+inherit autotools
inherit pythonnative
inherit pkgconfig
inherit gettext
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
index d99a300285..03a24f08be 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
@@ -95,6 +95,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
file://rpmqv_cc_b_gone.patch \
file://rpm-realpath.patch \
file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
+ file://no-ldflags-in-pkgconfig.patch \
"
# Uncomment the following line to enable platform score debugging
diff --git a/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch b/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch
new file mode 100644
index 0000000000..5ece5420a3
--- /dev/null
+++ b/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch
@@ -0,0 +1,135 @@
+From 962f8b90045ab331fc04c9e65f80f1a53e68243b Mon Sep 17 00:00:00 2001
+From: Wayne Davison <wayned@samba.org>
+Date: Wed, 31 Dec 2014 12:41:03 -0800
+Subject: [PATCH] Complain if an inc-recursive path is not right for its dir.
+ This ensures that a malicious sender can't use a just-sent symlink as a
+ trasnfer path.
+
+Upstream-Status: BackPort
+
+Fix the CVE-2014-9512, rsync 3.1.1 allows remote attackers to write to arbitrary
+files via a symlink attack on a file in the synchronization path.
+
+BackPort and fix this patch to make it able to apply to source code
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ flist.c | 22 ++++++++++++++++++++--
+ io.c | 2 +-
+ main.c | 4 ++--
+ rsync.c | 2 +-
+ proto.h | 2 +-
+ 6 files changed, 31 insertions(+), 8 deletions(-)
+
+diff --git a/flist.c b/flist.c
+index c24672e..92e4b65 100644
+--- a/flist.c
++++ b/flist.c
+@@ -2435,8 +2435,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+ return flist;
+ }
+
+-struct file_list *recv_file_list(int f)
++struct file_list *recv_file_list(int f, int dir_ndx)
+ {
++ const char *good_dirname = NULL;
+ struct file_list *flist;
+ int dstart, flags;
+ int64 start_read;
+@@ -2492,6 +2493,23 @@ struct file_list *recv_file_list(int f)
+ flist_expand(flist, 1);
+ file = recv_file_entry(f, flist, flags);
+
++ if (inc_recurse) {
++ static const char empty_dir[] = "\0";
++ const char *cur_dir = file->dirname ? file->dirname : empty_dir;
++ if (relative_paths && *cur_dir == '/')
++ cur_dir++;
++ if (cur_dir != good_dirname) {
++ const char *d = dir_ndx >= 0 ? f_name(dir_flist->files[dir_ndx], NULL) : empty_dir;
++ if (strcmp(cur_dir, d) != 0) {
++ rprintf(FERROR,
++ "ABORTING due to invalid dir prefix from sender: %s (should be: %s)\n",
++ cur_dir, d);
++ exit_cleanup(RERR_PROTOCOL);
++ }
++ good_dirname = cur_dir;
++ }
++ }
++
+ if (S_ISREG(file->mode)) {
+ /* Already counted */
+ } else if (S_ISDIR(file->mode)) {
+@@ -2615,7 +2633,7 @@ void recv_additional_file_list(int f)
+ rprintf(FINFO, "[%s] receiving flist for dir %d\n",
+ who_am_i(), ndx);
+ }
+- flist = recv_file_list(f);
++ flist = recv_file_list(f, ndx);
+ flist->parent_ndx = ndx;
+ }
+ }
+diff --git a/io.c b/io.c
+index b9a9bd0..a868fa9 100644
+--- a/io.c
++++ b/io.c
+@@ -1685,7 +1685,7 @@ void wait_for_receiver(void)
+ rprintf(FINFO, "[%s] receiving flist for dir %d\n",
+ who_am_i(), ndx);
+ }
+- flist = recv_file_list(iobuf.in_fd);
++ flist = recv_file_list(iobuf.in_fd, ndx);
+ flist->parent_ndx = ndx;
+ #ifdef SUPPORT_HARD_LINKS
+ if (preserve_hard_links)
+diff --git a/main.c b/main.c
+index e7a13f7..713b818 100644
+--- a/main.c
++++ b/main.c
+@@ -1009,7 +1009,7 @@ static void do_server_recv(int f_in, int f_out, int argc, char *argv[])
+ filesfrom_fd = -1;
+ }
+
+- flist = recv_file_list(f_in);
++ flist = recv_file_list(f_in, -1);
+ if (!flist) {
+ rprintf(FERROR,"server_recv: recv_file_list error\n");
+ exit_cleanup(RERR_FILESELECT);
+@@ -1183,7 +1183,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
+
+ if (write_batch && !am_server)
+ start_write_batch(f_in);
+- flist = recv_file_list(f_in);
++ flist = recv_file_list(f_in, -1);
+ if (inc_recurse && file_total == 1)
+ recv_additional_file_list(f_in);
+
+diff --git a/rsync.c b/rsync.c
+index 68ff6b1..c3ecc51 100644
+--- a/rsync.c
++++ b/rsync.c
+@@ -364,7 +364,7 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
+ }
+ /* Send all the data we read for this flist to the generator. */
+ start_flist_forward(ndx);
+- flist = recv_file_list(f_in);
++ flist = recv_file_list(f_in, ndx);
+ flist->parent_ndx = ndx;
+ stop_flist_forward();
+ }
+diff --git a/proto.h b/proto.h
+index 22fc539..247c558 100644
+--- a/proto.h
++++ b/proto.h
+@@ -89,7 +89,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+ void unmake_file(struct file_struct *file);
+ void send_extra_file_list(int f, int at_least);
+ struct file_list *send_file_list(int f, int argc, char *argv[]);
+-struct file_list *recv_file_list(int f);
++struct file_list *recv_file_list(int f, int dir_ndx);
+ void recv_additional_file_list(int f);
+ int flist_find(struct file_list *flist, struct file_struct *f);
+ int flist_find_ignore_dirness(struct file_list *flist, struct file_struct *f);
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.0.bb b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
index a4a5c102d4..3a79154511 100644
--- a/meta/recipes-devtools/rsync/rsync_3.1.0.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.1.1.bb
@@ -1,10 +1,12 @@
require rsync.inc
-SRC_URI += "file://acinclude.m4"
+SRC_URI += "file://acinclude.m4 \
+ file://0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch \
+"
-SRC_URI[md5sum] = "3be148772a33224771a8d4d2a028b132"
-SRC_URI[sha256sum] = "81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e"
+SRC_URI[md5sum] = "43bd6676f0b404326eee2d63be3cdcfe"
+SRC_URI[sha256sum] = "7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621"
PACKAGECONFIG ??= "acl attr"
PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 64f85c262d..d126132a87 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -9,6 +9,8 @@ SRC_URI = "file://run-postinsts \
file://run-postinsts.init \
file://run-postinsts.service"
+S = "${WORKDIR}"
+
inherit allarch systemd update-rc.d
INITSCRIPT_NAME = "run-postinsts"
diff --git a/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch b/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch
deleted file mode 100644
index 5a0090eb6d..0000000000
--- a/meta/recipes-devtools/strace/strace-4.8/0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Upstream-Status: Backport
-
-From 0b4060f61f1bb101b5d8d084714b7d2feacdb199 Mon Sep 17 00:00:00 2001
-From: Ali Polatel <alip@exherbo.org>
-Date: Tue, 24 Sep 2013 20:04:32 +0300
-Subject: [PATCH] Work around conflict between <sys/ptrace.h> and
- <linux/ptrace.h>
-
-Since glibc-2.18~39 <sys/ptrace.h> defines ptrace_peeksiginfo_args
-which collides with <linux/ptrace.h>.
-
-* configure.ac: Check for `struct ptrace_peeksiginfo_args' in
-<sys/ptrace.h>.
-* process.c: Work around potential conflict between <sys/ptrace.h>
-and <linux/ptrace.h> by redefining ptrace_peeksiginfo_args.
-* signal.c: Likewise.
-* syscall.c: Likewise.
-* util.c: Likewise.
-
-Signed-off-by: Ali Polatel <alip@exherbo.org>
----
- configure.ac | 2 +-
- process.c | 4 ++++
- signal.c | 4 ++++
- syscall.c | 4 ++++
- util.c | 4 ++++
- 5 files changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index f19e4f2..aa4923a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -257,7 +257,7 @@ AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr,
-
- AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>])
-
--AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg],,,
-+AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,,
- [#include <sys/ptrace.h>])
-
- AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
-diff --git a/process.c b/process.c
-index 1a2181b..59428a4 100644
---- a/process.c
-+++ b/process.c
-@@ -63,7 +63,11 @@
- # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
- # define pt_all_user_regs XXX_pt_all_user_regs
- # endif
-+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
-+# endif
- # include <linux/ptrace.h>
-+# undef ptrace_peeksiginfo_args
- # undef ia64_fpreg
- # undef pt_all_user_regs
- #endif
-diff --git a/signal.c b/signal.c
-index 7fb9abf..3411ddd 100644
---- a/signal.c
-+++ b/signal.c
-@@ -51,7 +51,11 @@
- # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
- # define pt_all_user_regs XXX_pt_all_user_regs
- # endif
-+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
-+# endif
- # include <linux/ptrace.h>
-+# undef ptrace_peeksiginfo_args
- # undef ia64_fpreg
- # undef pt_all_user_regs
- #endif
-diff --git a/syscall.c b/syscall.c
-index 83a95bd..3477dcd 100644
---- a/syscall.c
-+++ b/syscall.c
-@@ -48,7 +48,11 @@
- # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
- # define pt_all_user_regs XXX_pt_all_user_regs
- # endif
-+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
-+# endif
- # include <linux/ptrace.h>
-+# undef ptrace_peeksiginfo_args
- # undef ia64_fpreg
- # undef pt_all_user_regs
- #endif
-diff --git a/util.c b/util.c
-index 0dab902..30a7f19 100644
---- a/util.c
-+++ b/util.c
-@@ -55,7 +55,11 @@
- # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
- # define pt_all_user_regs XXX_pt_all_user_regs
- # endif
-+# ifdef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
-+# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
-+# endif
- # include <linux/ptrace.h>
-+# undef ptrace_peeksiginfo_args
- # undef ia64_fpreg
- # undef pt_all_user_regs
- #endif
---
-1.8.2.1
-
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch b/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch
deleted file mode 100644
index a6579df598..0000000000
--- a/meta/recipes-devtools/strace/strace-4.8/strace-fix-64-bit-process-detection.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-powerpc64: fix 64-bit process detection on embedded
-
-* syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection
-on embedded powerpc.
-
-Upstream-Status: Backport
-
-Signed-off-by: James Yang <james.yang@freescale.com>
-Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
-
-diff --git a/syscall.c.orig b/syscall.c
-index 7efee0e..72d9453 100644
---- a/syscall.c.orig
-+++ b/syscall.c
-@@ -1207,11 +1207,14 @@ get_scno(struct tcb *tcp)
- /* Check for 64/32 bit mode. */
- if (upeek(tcp, sizeof(unsigned long)*PT_MSR, &val) < 0)
- return -1;
-- /* SF is bit 0 of MSR */
-- if (val < 0)
-- currpers = 0;
-- else
-- currpers = 1;
-+
-+ /*
-+ * Check for 64/32 bit mode.
-+ * Embedded implementations covered by Book E extension of PPC use
-+ * bit 0 (CM) of 32-bit Machine state register (MSR).
-+ * Other implementations use bit 0 (SF) of 64-bit MSR.
-+ */
-+ currpers = (val & 0x8000000080000000) ? 0 : 1;
- update_personality(tcp, currpers);
- # endif
- #elif defined(AVR32)
diff --git a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
index 3a0eb39375..df013102d7 100644
--- a/meta/recipes-devtools/strace/strace-4.8/Makefile-ptest.patch
+++ b/meta/recipes-devtools/strace/strace-4.9/Makefile-ptest.patch
@@ -4,13 +4,32 @@ Upstream-Status: Inappropriate
Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 2 +-
+ tests/Makefile.am | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
---- old/tests/Makefile.am 2013-07-23 13:44:24.660481381 +0200
-+++ new/tests/Makefile.am 2013-07-23 16:22:42.937654391 +0200
-@@ -9,3 +9,21 @@
- EXTRA_DIST = init.sh $(TESTS)
+diff --git a/configure.ac b/configure.ac
+index 054f85b..9aec566 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,7 @@ AC_INIT([strace],
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_HEADERS([config.h])
+-AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+ AM_MAINTAINER_MODE
+ AC_CANONICAL_HOST
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 922452a..b17837f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -37,3 +37,21 @@ TEST_LOG_COMPILER = $(srcdir)/run.sh
+ EXTRA_DIST = init.sh run.sh sigaction.awk $(TESTS)
- CLEANFILES = check.log
+ CLEANFILES = $(TESTS:=.tmp)
+
+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
+
@@ -28,14 +47,7 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
-+ sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/net
---- a/configure.ac
-+++ b/configure.ac
-@@ -6,7 +6,7 @@ AC_INIT([strace],
- AC_CONFIG_SRCDIR([strace.c])
- AC_CONFIG_AUX_DIR([.])
- AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules])
-+AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
- AM_MAINTAINER_MODE
- AC_CANONICAL_HOST
++ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace-4.8/git-version-gen b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
index 8fee74e121..8fee74e121 100755
--- a/meta/recipes-devtools/strace/strace-4.8/git-version-gen
+++ b/meta/recipes-devtools/strace/strace-4.9/git-version-gen
diff --git a/meta/recipes-devtools/strace/strace-4.8/run-ptest b/meta/recipes-devtools/strace/strace-4.9/run-ptest
index 133cf92d02..133cf92d02 100755
--- a/meta/recipes-devtools/strace/strace-4.8/run-ptest
+++ b/meta/recipes-devtools/strace/strace-4.9/run-ptest
diff --git a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
index 27266d9052..15e37bce03 100644
--- a/meta/recipes-devtools/strace/strace-4.8/strace-add-configure-options.patch
+++ b/meta/recipes-devtools/strace/strace-4.9/strace-add-configure-options.patch
@@ -3,18 +3,24 @@ Add options "aio" and "acl" to enable/disable libaio and acl support.
Upstream-Status: Pending
Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac | 27 ++++++++++++++++++++++++++-
+ 1 file changed, 26 insertions(+), 1 deletion(-)
---- strace-4.8/configure.ac.orig 2013-06-21 15:37:52.145892182 +0800
-+++ strace-4.8/configure.ac 2013-06-21 15:45:49.029909004 +0800
-@@ -219,7 +219,6 @@ AC_CHECK_HEADERS(m4_normalize([
- netinet/sctp.h
+diff --git a/configure.ac b/configure.ac
+index 054f85b..8ed49f1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -238,7 +238,6 @@ AC_CHECK_HEADERS(m4_normalize([
poll.h
+ scsi/sg.h
stropts.h
- sys/acl.h
sys/asynch.h
sys/conf.h
sys/epoll.h
-@@ -231,6 +230,19 @@ AC_CHECK_HEADERS(m4_normalize([
+@@ -250,6 +249,18 @@ AC_CHECK_HEADERS(m4_normalize([
sys/uio.h
sys/vfs.h
]))
@@ -22,30 +28,25 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+AC_ARG_ENABLE([acl],
+ [AS_HELP_STRING([--enable-acl], [turn on acl support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([sys/acl.h])
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
-+
+)
+
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
[], [], [#include <stddef.h>
#include <sys/socket.h>
-@@ -301,10 +313,19 @@ AC_CHECK_SIZEOF([long])
- AC_CHECK_SIZEOF([long long])
- AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>])
+@@ -649,6 +660,20 @@ if test "x$st_cv_have___builtin_popcount" = xyes; then
+ [Define to 1 if the system provides __builtin_popcount function])
+ fi
--AC_CHECK_HEADERS([libaio.h], [
-- AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-- AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
--])
+AC_ARG_ENABLE([aio],
+ [AS_HELP_STRING([--enable-aio], [turn on libaio support])],
+ [case $enableval in
-+ yes)
++ yes)
+ AC_CHECK_HEADERS([libaio.h], [
+ AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
+ AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
@@ -55,6 +56,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
+ *) AC_MSG_ERROR([bad value $enableval for aio option]) ;;
+ esac]
+)
-
++
AC_PATH_PROG([PERL], [perl])
+ dnl stack trace with libunwind
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch b/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
new file mode 100644
index 0000000000..f70766b646
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
@@ -0,0 +1,25 @@
+From f85854131c8265f2eb59c714dcea5c4b3dc09bed Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi@linaro.org>
+Date: Wed, 15 Apr 2015 14:29:37 +0200
+Subject: [PATCH] Add linux/aarch64/arch_regs.h
+
+It is missing from the tarball, but it is present in git for v4.10
+
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
+Upstream-status: Pending
+---
+ linux/aarch64/arch_regs.h | 2 ++
+ 1 file changed, 2 insertions(+)
+ create mode 100644 linux/aarch64/arch_regs.h
+
+diff --git a/linux/aarch64/arch_regs.h b/linux/aarch64/arch_regs.h
+new file mode 100644
+index 0000000..9a5e33e
+--- /dev/null
++++ b/linux/aarch64/arch_regs.h
+@@ -0,0 +1,2 @@
++extern uint64_t *const aarch64_sp_ptr;
++extern uint32_t *const arm_sp_ptr;
+--
+1.9.3
+
diff --git a/meta/recipes-devtools/strace/strace_4.8.bb b/meta/recipes-devtools/strace/strace_4.9.bb
index ed738eaad7..61fd99ed10 100644
--- a/meta/recipes-devtools/strace/strace_4.8.bb
+++ b/meta/recipes-devtools/strace/strace_4.9.bb
@@ -5,24 +5,24 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
+ file://0001-Add-linux-aarch64-arch_regs.h.patch \
file://git-version-gen \
file://strace-add-configure-options.patch \
file://Makefile-ptest.patch \
- file://strace-fix-64-bit-process-detection.patch \
file://run-ptest \
- file://0001-Work-around-conflict-between-sys-ptrace.h-and-linux-.patch \
"
-SRC_URI[md5sum] = "c575ef43829586801f514fd91bfe7575"
-SRC_URI[sha256sum] = "f492291f07a7c805c07a8395cce1ea054a6401ad414f4cc12185672215e1d7f8"
+SRC_URI[md5sum] = "885eafadb10f6c60464a266d3929a2a4"
+SRC_URI[sha256sum] = "095bfea5c540b91d297ccac73b21b92fd54a24599fd70395db87ff9eb7fd6f65"
inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
PACKAGECONFIG_class-target ?= "libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind"
export INCLUDES = "-I. -I./linux"
diff --git a/meta/recipes-devtools/subversion/subversion-1.8.9/disable_macos.patch b/meta/recipes-devtools/subversion/subversion-1.8.11/disable_macos.patch
index ec3be496f3..ec3be496f3 100644
--- a/meta/recipes-devtools/subversion/subversion-1.8.9/disable_macos.patch
+++ b/meta/recipes-devtools/subversion/subversion-1.8.11/disable_macos.patch
diff --git a/meta/recipes-devtools/subversion/subversion-1.8.9/libtool2.patch b/meta/recipes-devtools/subversion/subversion-1.8.11/libtool2.patch
index 5cd572bfc8..5cd572bfc8 100644
--- a/meta/recipes-devtools/subversion/subversion-1.8.9/libtool2.patch
+++ b/meta/recipes-devtools/subversion/subversion-1.8.11/libtool2.patch
diff --git a/meta/recipes-devtools/subversion/subversion-1.8.9/subversion-CVE-2014-3522.patch b/meta/recipes-devtools/subversion/subversion-1.8.9/subversion-CVE-2014-3522.patch
deleted file mode 100644
index f259e5490a..0000000000
--- a/meta/recipes-devtools/subversion/subversion-1.8.9/subversion-CVE-2014-3522.patch
+++ /dev/null
@@ -1,444 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
-
-Index: subversion/include/private/svn_cert.h
-===================================================================
---- subversion/include/private/svn_cert.h (nonexistent)
-+++ subversion/include/private/svn_cert.h (working copy)
-@@ -0,0 +1,68 @@
-+/**
-+ * @copyright
-+ * ====================================================================
-+ * Licensed to the Apache Software Foundation (ASF) under one
-+ * or more contributor license agreements. See the NOTICE file
-+ * distributed with this work for additional information
-+ * regarding copyright ownership. The ASF licenses this file
-+ * to you under the Apache License, Version 2.0 (the
-+ * "License"); you may not use this file except in compliance
-+ * with the License. You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing,
-+ * software distributed under the License is distributed on an
-+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-+ * KIND, either express or implied. See the License for the
-+ * specific language governing permissions and limitations
-+ * under the License.
-+ * ====================================================================
-+ * @endcopyright
-+ *
-+ * @file svn_cert.h
-+ * @brief Implementation of certificate validation functions
-+ */
-+
-+#ifndef SVN_CERT_H
-+#define SVN_CERT_H
-+
-+#include <apr.h>
-+
-+#include "svn_types.h"
-+#include "svn_string.h"
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif /* __cplusplus */
-+
-+
-+/* Return TRUE iff @a pattern matches @a hostname as defined
-+ * by the matching rules of RFC 6125. In the context of RFC
-+ * 6125 the pattern is the domain name portion of the presented
-+ * identifier (which comes from the Common Name or a DNSName
-+ * portion of the subjectAltName of an X.509 certificate) and
-+ * the hostname is the source domain (i.e. the host portion
-+ * of the URI the user entered).
-+ *
-+ * @note With respect to wildcards we only support matching
-+ * wildcards in the left-most label and as the only character
-+ * in the left-most label (i.e. we support RFC 6125 s. 6.4.3
-+ * Rule 1 and 2 but not the optional Rule 3). This may change
-+ * in the future.
-+ *
-+ * @note Subversion does not at current support internationalized
-+ * domain names. Both values are presumed to be in NR-LDH label
-+ * or A-label form (see RFC 5890 for the definition).
-+ *
-+ * @since New in 1.9.
-+ */
-+svn_boolean_t
-+svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif /* __cplusplus */
-+
-+#endif /* SVN_CERT_H */
-Index: subversion/libsvn_ra_serf/util.c
-===================================================================
---- subversion/libsvn_ra_serf/util.c (revision 1615128)
-+++ subversion/libsvn_ra_serf/util.c (working copy)
-@@ -28,7 +28,6 @@
- #define APR_WANT_STRFUNC
- #include <apr.h>
- #include <apr_want.h>
--#include <apr_fnmatch.h>
-
- #include <serf.h>
- #include <serf_bucket_types.h>
-@@ -49,6 +48,7 @@
- #include "private/svn_fspath.h"
- #include "private/svn_subr_private.h"
- #include "private/svn_auth_private.h"
-+#include "private/svn_cert.h"
-
- #include "ra_serf.h"
-
-@@ -274,7 +274,6 @@ ssl_server_cert(void *baton, int failures,
- apr_hash_t *subject = NULL;
- apr_hash_t *serf_cert = NULL;
- void *creds;
-- int found_matching_hostname = 0;
-
- svn_failures = (ssl_convert_serf_failures(failures)
- | conn->server_cert_failures);
-@@ -286,26 +285,37 @@ ssl_server_cert(void *baton, int failures,
- ### This should really be handled by serf, which should pass an error
- for this case, but that has backwards compatibility issues. */
- apr_array_header_t *san;
-+ svn_boolean_t found_san_entry = FALSE;
-+ svn_boolean_t found_matching_hostname = FALSE;
-+ svn_string_t *actual_hostname =
-+ svn_string_create(conn->session->session_url.hostname, scratch_pool);
-
- serf_cert = serf_ssl_cert_certificate(cert, scratch_pool);
-
- san = svn_hash_gets(serf_cert, "subjectAltName");
- /* Try to find matching server name via subjectAltName first... */
-- if (san) {
-+ if (san)
-+ {
- int i;
-- for (i = 0; i < san->nelts; i++) {
-+ found_san_entry = san->nelts > 0;
-+ for (i = 0; i < san->nelts; i++)
-+ {
- const char *s = APR_ARRAY_IDX(san, i, const char*);
-- if (apr_fnmatch(s, conn->session->session_url.hostname,
-- APR_FNM_PERIOD | APR_FNM_CASE_BLIND) == APR_SUCCESS)
-- {
-- found_matching_hostname = 1;
-+ svn_string_t *cert_hostname = svn_string_create(s, scratch_pool);
-+
-+ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
-+ {
-+ found_matching_hostname = TRUE;
- break;
-- }
-- }
-- }
-+ }
-+ }
-+ }
-
-- /* Match server certificate CN with the hostname of the server */
-- if (!found_matching_hostname)
-+ /* Match server certificate CN with the hostname of the server iff
-+ * we didn't find any subjectAltName fields and try to match them.
-+ * Per RFC 2818 they are authoritative if present and CommonName
-+ * should be ignored. */
-+ if (!found_matching_hostname && !found_san_entry)
- {
- const char *hostname = NULL;
-
-@@ -314,13 +324,20 @@ ssl_server_cert(void *baton, int failures,
- if (subject)
- hostname = svn_hash_gets(subject, "CN");
-
-- if (!hostname
-- || apr_fnmatch(hostname, conn->session->session_url.hostname,
-- APR_FNM_PERIOD | APR_FNM_CASE_BLIND) != APR_SUCCESS)
-- {
-- svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
-- }
-- }
-+ if (hostname)
-+ {
-+ svn_string_t *cert_hostname = svn_string_create(hostname,
-+ scratch_pool);
-+
-+ if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
-+ {
-+ found_matching_hostname = TRUE;
-+ }
-+ }
-+ }
-+
-+ if (!found_matching_hostname)
-+ svn_failures |= SVN_AUTH_SSL_CNMISMATCH;
- }
-
- if (!svn_failures)
-Index: subversion/libsvn_subr/dirent_uri.c
-===================================================================
---- subversion/libsvn_subr/dirent_uri.c (revision 1615128)
-+++ subversion/libsvn_subr/dirent_uri.c (working copy)
-@@ -38,6 +38,7 @@
-
- #include "dirent_uri.h"
- #include "private/svn_fspath.h"
-+#include "private/svn_cert.h"
-
- /* The canonical empty path. Can this be changed? Well, change the empty
- test below and the path library will work, not so sure about the fs/wc
-@@ -2597,3 +2598,81 @@ svn_urlpath__canonicalize(const char *uri,
- }
- return uri;
- }
-+
-+
-+/* -------------- The cert API (see private/svn_cert.h) ------------- */
-+
-+svn_boolean_t
-+svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname)
-+{
-+ apr_size_t pattern_pos = 0, hostname_pos = 0;
-+
-+ /* support leading wildcards that composed of the only character in the
-+ * left-most label. */
-+ if (pattern->len >= 2 &&
-+ pattern->data[pattern_pos] == '*' &&
-+ pattern->data[pattern_pos + 1] == '.')
-+ {
-+ while (hostname_pos < hostname->len &&
-+ hostname->data[hostname_pos] != '.')
-+ {
-+ hostname_pos++;
-+ }
-+ /* Assume that the wildcard must match something. Rule 2 says
-+ * that *.example.com should not match example.com. If the wildcard
-+ * ends up not matching anything then it matches .example.com which
-+ * seems to be essentially the same as just example.com */
-+ if (hostname_pos == 0)
-+ return FALSE;
-+
-+ pattern_pos++;
-+ }
-+
-+ while (pattern_pos < pattern->len && hostname_pos < hostname->len)
-+ {
-+ char pattern_c = pattern->data[pattern_pos];
-+ char hostname_c = hostname->data[hostname_pos];
-+
-+ /* fold case as described in RFC 4343.
-+ * Note: We actually convert to lowercase, since our URI
-+ * canonicalization code converts to lowercase and generally
-+ * most certs are issued with lowercase DNS names, meaning
-+ * this avoids the fold operation in most cases. The RFC
-+ * suggests the opposite transformation, but doesn't require
-+ * any specific implementation in any case. It is critical
-+ * that this folding be locale independent so you can't use
-+ * tolower(). */
-+ pattern_c = canonicalize_to_lower(pattern_c);
-+ hostname_c = canonicalize_to_lower(hostname_c);
-+
-+ if (pattern_c != hostname_c)
-+ {
-+ /* doesn't match */
-+ return FALSE;
-+ }
-+ else
-+ {
-+ /* characters match so skip both */
-+ pattern_pos++;
-+ hostname_pos++;
-+ }
-+ }
-+
-+ /* ignore a trailing period on the hostname since this has no effect on the
-+ * security of the matching. See the following for the long explanation as
-+ * to why:
-+ * https://bugzilla.mozilla.org/show_bug.cgi?id=134402#c28
-+ */
-+ if (pattern_pos == pattern->len &&
-+ hostname_pos == hostname->len - 1 &&
-+ hostname->data[hostname_pos] == '.')
-+ hostname_pos++;
-+
-+ if (pattern_pos != pattern->len || hostname_pos != hostname->len)
-+ {
-+ /* end didn't match */
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-Index: subversion/tests/libsvn_subr/dirent_uri-test.c
-===================================================================
---- subversion/tests/libsvn_subr/dirent_uri-test.c (revision 1615128)
-+++ subversion/tests/libsvn_subr/dirent_uri-test.c (working copy)
-@@ -37,6 +37,7 @@
- #include "svn_pools.h"
- #include "svn_dirent_uri.h"
- #include "private/svn_fspath.h"
-+#include "private/svn_cert.h"
-
- #include "../svn_test.h"
-
-@@ -2714,6 +2715,145 @@ test_fspath_get_longest_ancestor(apr_pool_t *pool)
- return SVN_NO_ERROR;
- }
-
-+struct cert_match_dns_test {
-+ const char *pattern;
-+ const char *hostname;
-+ svn_boolean_t expected;
-+};
-+
-+static svn_error_t *
-+run_cert_match_dns_tests(struct cert_match_dns_test *tests, apr_pool_t *pool)
-+{
-+ struct cert_match_dns_test *ct;
-+ apr_pool_t *iterpool = svn_pool_create(pool);
-+
-+ for (ct = tests; ct->pattern; ct++)
-+ {
-+ svn_boolean_t result;
-+ svn_string_t *pattern, *hostname;
-+
-+ svn_pool_clear(iterpool);
-+
-+ pattern = svn_string_create(ct->pattern, iterpool);
-+ hostname = svn_string_create(ct->hostname, iterpool);
-+
-+ result = svn_cert__match_dns_identity(pattern, hostname);
-+ if (result != ct->expected)
-+ return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+ "Expected %s but got %s for pattern '%s' on "
-+ "hostname '%s'",
-+ ct->expected ? "match" : "no match",
-+ result ? "match" : "no match",
-+ pattern->data, hostname->data);
-+
-+ }
-+
-+ svn_pool_destroy(iterpool);
-+
-+ return SVN_NO_ERROR;
-+}
-+
-+static struct cert_match_dns_test cert_match_dns_tests[] = {
-+ { "foo.example.com", "foo.example.com", TRUE }, /* exact match */
-+ { "foo.example.com", "FOO.EXAMPLE.COM", TRUE }, /* case differences */
-+ { "FOO.EXAMPLE.COM", "foo.example.com", TRUE },
-+ { "*.example.com", "FoO.ExAmPlE.CoM", TRUE },
-+ { "*.ExAmPlE.CoM", "foo.example.com", TRUE },
-+ { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", TRUE },
-+ { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", TRUE },
-+ { "foo.example.com", "bar.example.com", FALSE }, /* difference at start */
-+ { "foo.example.com", "foo.example.net", FALSE }, /* difference at end */
-+ { "foo.example.com", "foo.example.commercial", FALSE }, /* hostname longer */
-+ { "foo.example.commercial", "foo.example.com", FALSE }, /* pattern longer */
-+ { "foo.example.comcom", "foo.example.com", FALSE }, /* repeated suffix */
-+ { "foo.example.com", "foo.example.comcom", FALSE },
-+ { "foo.example.com.com", "foo.example.com", FALSE },
-+ { "foo.example.com", "foo.example.com.com", FALSE },
-+ { "foofoo.example.com", "foo.example.com", FALSE }, /* repeated prefix */
-+ { "foo.example.com", "foofoo.example.com", FALSE },
-+ { "foo.foo.example.com", "foo.example.com", FALSE },
-+ { "foo.example.com", "foo.foo.example.com", FALSE },
-+ { "foo.*.example.com", "foo.bar.example.com", FALSE }, /* RFC 6125 s. 6.4.3
-+ Rule 1 */
-+ { "*.example.com", "foo.example.com", TRUE }, /* RFC 6125 s. 6.4.3 Rule 2 */
-+ { "*.example.com", "bar.foo.example.com", FALSE }, /* Rule 2 */
-+ { "*.example.com", "example.com", FALSE }, /* Rule 2 */
-+ { "*.example.com", ".example.com", FALSE }, /* RFC doesn't say what to do
-+ here and a leading period on
-+ a hostname doesn't make sense
-+ so we'll just reject this. */
-+ { "*", "foo.example.com", FALSE }, /* wildcard must be left-most label,
-+ implies that there must be more than
-+ one label. */
-+ { "*", "example.com", FALSE },
-+ { "*", "com", FALSE },
-+ { "*.example.com", "foo.example.net", FALSE }, /* difference in literal text
-+ with a wildcard. */
-+ { "*.com", "example.com", TRUE }, /* See Errata ID 3090 for RFC 6125,
-+ probably shouldn't allow this but
-+ we do for now. */
-+ { "*.", "example.com", FALSE }, /* test some dubious 2 character wildcard
-+ patterns */
-+ { "*.", "example.", TRUE }, /* This one feels questionable */
-+ { "*.", "example", FALSE },
-+ { "*.", ".", FALSE },
-+ { "a", "a", TRUE }, /* check that single letter exact matches work */
-+ { "a", "b", FALSE }, /* and single letter not matches shouldn't */
-+ { "*.*.com", "foo.example.com", FALSE }, /* unsupported wildcards */
-+ { "*.*.com", "example.com", FALSE },
-+ { "**.example.com", "foo.example.com", FALSE },
-+ { "**.example.com", "example.com", FALSE },
-+ { "f*.example.com", "foo.example.com", FALSE },
-+ { "f*.example.com", "bar.example.com", FALSE },
-+ { "*o.example.com", "foo.example.com", FALSE },
-+ { "*o.example.com", "bar.example.com", FALSE },
-+ { "f*o.example.com", "foo.example.com", FALSE },
-+ { "f*o.example.com", "bar.example.com", FALSE },
-+ { "foo.e*.com", "foo.example.com", FALSE },
-+ { "foo.*e.com", "foo.example.com", FALSE },
-+ { "foo.e*e.com", "foo.example.com", FALSE },
-+ { "foo.example.com", "foo.example.com.", TRUE }, /* trailing dot */
-+ { "*.example.com", "foo.example.com.", TRUE },
-+ { "foo", "foo.", TRUE },
-+ { "foo.example.com.", "foo.example.com", FALSE },
-+ { "*.example.com.", "foo.example.com", FALSE },
-+ { "foo.", "foo", FALSE },
-+ { "foo.example.com", "foo.example.com..", FALSE },
-+ { "*.example.com", "foo.example.com..", FALSE },
-+ { "foo", "foo..", FALSE },
-+ { "foo.example.com..", "foo.example.com", FALSE },
-+ { "*.example.com..", "foo.example.com", FALSE },
-+ { "foo..", "foo", FALSE },
-+ { NULL }
-+};
-+
-+static svn_error_t *
-+test_cert_match_dns_identity(apr_pool_t *pool)
-+{
-+ return run_cert_match_dns_tests(cert_match_dns_tests, pool);
-+}
-+
-+/* This test table implements results that should happen if we supported
-+ * RFC 6125 s. 6.4.3 Rule 3. We don't so it's expected to fail for now. */
-+static struct cert_match_dns_test rule3_tests[] = {
-+ { "baz*.example.net", "baz1.example.net", TRUE },
-+ { "*baz.example.net", "foobaz.example.net", TRUE },
-+ { "b*z.example.net", "buuz.example.net", TRUE },
-+ { "b*z.example.net", "bz.example.net", FALSE }, /* presume wildcard can't
-+ match nothing */
-+ { "baz*.example.net", "baz.example.net", FALSE },
-+ { "*baz.example.net", "baz.example.net", FALSE },
-+ { "b*z.example.net", "buuzuuz.example.net", TRUE }, /* presume wildcard
-+ should be greedy */
-+ { NULL }
-+};
-+
-+static svn_error_t *
-+test_rule3(apr_pool_t *pool)
-+{
-+ return run_cert_match_dns_tests(rule3_tests, pool);
-+}
-+
-
- /* The test table. */
-
-@@ -2812,5 +2952,9 @@ struct svn_test_descriptor_t test_funcs[] =
- "test svn_fspath__dirname/basename/split"),
- SVN_TEST_PASS2(test_fspath_get_longest_ancestor,
- "test svn_fspath__get_longest_ancestor"),
-+ SVN_TEST_PASS2(test_cert_match_dns_identity,
-+ "test svn_cert__match_dns_identity"),
-+ SVN_TEST_XFAIL2(test_rule3,
-+ "test match with RFC 6125 s. 6.4.3 Rule 3"),
- SVN_TEST_NULL
- };
diff --git a/meta/recipes-devtools/subversion/subversion_1.6.15.bb b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
index b135bb7a3f..28163e5644 100644
--- a/meta/recipes-devtools/subversion/subversion_1.6.15.bb
+++ b/meta/recipes-devtools/subversion/subversion_1.6.15.bb
@@ -30,7 +30,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2a69fef414e2cb907b4544298569300b"
PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs --without-apache \
+ --without-berkeley-db --without-apxs \
--without-swig --with-apr=${STAGING_BINDIR_CROSS} \
--with-apr-util=${STAGING_BINDIR_CROSS} \
ac_cv_path_RUBY=none"
diff --git a/meta/recipes-devtools/subversion/subversion_1.8.9.bb b/meta/recipes-devtools/subversion/subversion_1.8.11.bb
index 1ef59a0c00..8e4cd9df08 100644
--- a/meta/recipes-devtools/subversion/subversion_1.8.9.bb
+++ b/meta/recipes-devtools/subversion/subversion_1.8.11.bb
@@ -12,11 +12,9 @@ inherit gettext
SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://libtool2.patch \
file://disable_macos.patch \
- file://subversion-CVE-2014-3522.patch;striplevel=0 \
- file://subversion-CVE-2014-3528.patch \
"
-SRC_URI[md5sum] = "bd495517a760ddd764ce449a891971db"
-SRC_URI[sha256sum] = "45d708a5c3ffbef4b2a1044c4716a053e680763743d1f7ba99d0369f6da49e33"
+SRC_URI[md5sum] = "766a89bbbb388f8eb76166672d3b9e49"
+SRC_URI[sha256sum] = "10b056420e1f194c12840368f6bf58842e6200f9cb8cc5ebbf9be2e89e56e4d9"
LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2f0119e478700b5428e26386cff923"
diff --git a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch b/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
deleted file mode 100644
index fb03bbfe2c..0000000000
--- a/meta/recipes-devtools/syslinux/files/0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Upstream-Status: Backport [ba638fd9bf72b0c786c88909014136cfa641a147]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From b663fd7257481438256f8267831dc10b06363b22 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Tue, 16 Jul 2013 22:16:11 +0100
-Subject: [PATCH 1/4] movebits: Add SMT_TERMINAL - a last resort region type
-
-Some memory regions are usable, but only as a last resort just before we
-hand over control to a kernel image. Add the necessary movebits
-infrastructure to use these regions when all other options have been
-exhausted.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/lib/syslinux/zonelist.c
----
- com32/include/syslinux/movebits.h | 1 +
- com32/lib/syslinux/movebits.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/com32/include/syslinux/movebits.h b/com32/include/syslinux/movebits.h
-index 8bcdf3e..114a896 100644
---- a/com32/include/syslinux/movebits.h
-+++ b/com32/include/syslinux/movebits.h
-@@ -34,6 +34,7 @@ enum syslinux_memmap_types {
- SMT_RESERVED, /* Unusable memory */
- SMT_ALLOC, /* Memory allocated by user */
- SMT_ZERO, /* Memory that should be zeroed */
-+ SMT_TERMINAL, /* Memory to be used as a last resort */
- };
-
- struct syslinux_memmap {
-diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c
-index 7a05f3c..8ffdc63 100644
---- a/com32/lib/syslinux/movebits.c
-+++ b/com32/lib/syslinux/movebits.c
-@@ -160,7 +160,7 @@ static const struct syslinux_memmap *is_free_zone(const struct syslinux_memmap
- if (list->start <= start) {
- if (llast >= last) {
- /* Chunk has a single, well-defined type */
-- if (list->type == SMT_FREE) {
-+ if (list->type == SMT_FREE || list->type == SMT_TERMINAL) {
- dprintf("F: 0x%08x bytes at 0x%08x\n",
- list->next->start, list->start);
- return list; /* It's free */
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch b/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
deleted file mode 100644
index 48d3955910..0000000000
--- a/meta/recipes-devtools/syslinux/files/0002-memscan-build-a-linked-list-of-memory-scanners.patch
+++ /dev/null
@@ -1,450 +0,0 @@
-Upstream-Status: Backport [787d7e568fe08d7080d2cd03cd9ee27c327eca67]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 2e05f34c0c5bc0144bb203a169009dfb6837b4e3 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 12:15:16 +0100
-Subject: [PATCH 2/4] memscan: build a linked list of memory scanners
-
-By registering memory scanners at runtime we can support multiple memory
-scanner functions, which helps us to isolate them and keep things
-modular, only registering them for specific platform/derivative
-combinations. This is preparation for adding a memory scanner that is
-specific to PXELINUX on bios and understands when the memory region
-occupied by the PXE stack can be reused.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- com32/include/syslinux/memscan.h
- com32/lib/syslinux/memscan.c
----
- com32/include/syslinux/firmware.h | 4 +-
- com32/include/syslinux/memscan.h | 14 +++-
- com32/lib/syslinux/memscan.c | 143 +++++++-------------------------------
- core/bios.c | 125 ++++++++++++++++++++++++++++++++-
- efi/main.c | 14 ++--
- 5 files changed, 173 insertions(+), 127 deletions(-)
-
-diff --git a/com32/include/syslinux/firmware.h b/com32/include/syslinux/firmware.h
-index 4a43c86..6cc06a0 100644
---- a/com32/include/syslinux/firmware.h
-+++ b/com32/include/syslinux/firmware.h
-@@ -1,7 +1,8 @@
- #ifndef _SYSLINUX_FIRMWARE_H
- #define _SYSLINUX_FIRMWARE_H
-
--#include <syslinux/memscan.h>
-+#include <inttypes.h>
-+#include <stdbool.h>
-
- struct term_state;
-
-@@ -42,7 +43,6 @@ struct mem_ops {
- void *(*malloc)(size_t, enum heap, size_t);
- void *(*realloc)(void *, size_t);
- void (*free)(void *);
-- int (*scan_memory)(scan_memory_callback_t, void *);
- };
-
- struct initramfs;
-diff --git a/com32/include/syslinux/memscan.h b/com32/include/syslinux/memscan.h
-index c3ebf84..ab78e28 100644
---- a/com32/include/syslinux/memscan.h
-+++ b/com32/include/syslinux/memscan.h
-@@ -29,11 +29,19 @@
- #ifndef _SYSLINUX_MEMSCAN_H
- #define _SYSLINUX_MEMSCAN_H
-
--#include <stdbool.h>
-+#include <linux/list.h>
- #include <syslinux/movebits.h> /* addr_t */
-
--typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t, bool);
-+typedef int (*scan_memory_callback_t) (void *, addr_t, addr_t,
-+ enum syslinux_memmap_types type);
-+
-+struct syslinux_memscan {
-+ int (*func)(scan_memory_callback_t callback, void *data);
-+ struct list_head next;
-+};
-+
-+void syslinux_memscan_add(struct syslinux_memscan *entry);
-+int syslinux_memscan_new(int (*func)(scan_memory_callback_t cb, void *data));
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data);
--int bios_scan_memory(scan_memory_callback_t callback, void *data);
-
- #endif /* _SYSLINUX_MEMSCAN_H */
-diff --git a/com32/lib/syslinux/memscan.c b/com32/lib/syslinux/memscan.c
-index 0ff25d7..fdb7274 100644
---- a/com32/lib/syslinux/memscan.c
-+++ b/com32/lib/syslinux/memscan.c
-@@ -32,133 +32,44 @@
- * Query the system for free memory
- */
-
--#include <assert.h>
--#include <stdbool.h>
--#include <stdlib.h>
--#include <string.h>
--#include <inttypes.h>
--#include <com32.h>
--
- #include <syslinux/memscan.h>
--#include <syslinux/firmware.h>
-
--struct e820_entry {
-- uint64_t start;
-- uint64_t len;
-- uint32_t type;
--};
-+static LIST_HEAD(syslinux_memscan_head);
-
--int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+/*
-+ * Add a memscan entry to the list.
-+ */
-+void syslinux_memscan_add(struct syslinux_memscan *entry)
- {
-- static com32sys_t ireg;
-- com32sys_t oreg;
-- struct e820_entry *e820buf;
-- uint64_t start, len, maxlen;
-- int memfound = 0;
-- int rv;
-- addr_t dosmem;
-- const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+ list_add(&entry->next, &syslinux_memscan_head);
-+}
-
-- /* Use INT 12h to get DOS memory */
-- __intcall(0x12, &__com32_zero_regs, &oreg);
-- dosmem = oreg.eax.w[0] << 10;
-- if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-- /* INT 12h reports nonsense... now what? */
-- uint16_t ebda_seg = *(uint16_t *) 0x40e;
-- if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-- dosmem = ebda_seg << 4;
-- else
-- dosmem = 640 * 1024; /* Hope for the best... */
-- }
-- rv = callback(data, bios_data, dosmem - bios_data, true);
-- if (rv)
-- return rv;
-+/*
-+ * Build a new memscan entry and add it to the list.
-+ */
-+int syslinux_memscan_new(int func(scan_memory_callback_t, void *data))
-+{
-+ struct syslinux_memscan *entry;
-
-- /* First try INT 15h AX=E820h */
-- e820buf = lzalloc(sizeof *e820buf);
-- if (!e820buf)
-+ entry = malloc(sizeof *entry);
-+ if (!entry)
- return -1;
-
-- ireg.eax.l = 0xe820;
-- ireg.edx.l = 0x534d4150;
-- ireg.ebx.l = 0;
-- ireg.ecx.l = sizeof(*e820buf);
-- ireg.es = SEG(e820buf);
-- ireg.edi.w[0] = OFFS(e820buf);
--
-- do {
-- __intcall(0x15, &ireg, &oreg);
--
-- if ((oreg.eflags.l & EFLAGS_CF) ||
-- (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-- break;
--
-- start = e820buf->start;
-- len = e820buf->len;
--
-- if (start < 0x100000000ULL) {
-- /* Don't rely on E820 being valid for low memory. Doing so
-- could mean stuff like overwriting the PXE stack even when
-- using "keeppxe", etc. */
-- if (start < 0x100000ULL) {
-- if (len > 0x100000ULL - start)
-- len -= 0x100000ULL - start;
-- else
-- len = 0;
-- start = 0x100000ULL;
-- }
--
-- maxlen = 0x100000000ULL - start;
-- if (len > maxlen)
-- len = maxlen;
--
-- if (len) {
-- rv = callback(data, (addr_t) start, (addr_t) len,
-- e820buf->type == 1);
-- if (rv)
-- return rv;
-- memfound = 1;
-- }
-- }
--
-- ireg.ebx.l = oreg.ebx.l;
-- } while (oreg.ebx.l);
--
-- lfree(e820buf);
--
-- if (memfound)
-- return 0;
--
-- /* Next try INT 15h AX=E801h */
-- ireg.eax.w[0] = 0xe801;
-- __intcall(0x15, &ireg, &oreg);
--
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
--
-- if (oreg.edx.w[0]) {
-- rv = callback(data, (addr_t) 16 << 20, oreg.edx.w[0] << 16, true);
-- if (rv)
-- return rv;
-- }
--
-- return 0;
-- }
--
-- /* Finally try INT 15h AH=88h */
-- ireg.eax.w[0] = 0x8800;
-- if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-- rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, true);
-- if (rv)
-- return rv;
-- }
--
-+ entry->func = func;
-+ syslinux_memscan_add(entry);
- return 0;
- }
-
- int syslinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-- return firmware->mem->scan_memory(callback, data);
-+ struct syslinux_memscan *entry;
-+ int rv = 0;
-+
-+ list_for_each_entry(entry, &syslinux_memscan_head, next) {
-+ rv = entry->func(callback, data);
-+ if (rv)
-+ break;
-+ }
-+
-+ return rv;
- }
-diff --git a/core/bios.c b/core/bios.c
-index 53223e8..5344833 100644
---- a/core/bios.c
-+++ b/core/bios.c
-@@ -501,6 +501,129 @@ static inline void bios_timer_init(void)
-
- extern uint16_t *bios_free_mem;
-
-+struct e820_entry {
-+ uint64_t start;
-+ uint64_t len;
-+ uint32_t type;
-+};
-+
-+static int bios_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ static com32sys_t ireg;
-+ com32sys_t oreg;
-+ struct e820_entry *e820buf;
-+ uint64_t start, len, maxlen;
-+ int memfound = 0;
-+ int rv;
-+ addr_t dosmem;
-+ const addr_t bios_data = 0x510; /* Amount to reserve for BIOS data */
-+
-+ /* Use INT 12h to get DOS memory */
-+ __intcall(0x12, &__com32_zero_regs, &oreg);
-+ dosmem = oreg.eax.w[0] << 10;
-+ if (dosmem < 32 * 1024 || dosmem > 640 * 1024) {
-+ /* INT 12h reports nonsense... now what? */
-+ uint16_t ebda_seg = *(uint16_t *) 0x40e;
-+ if (ebda_seg >= 0x8000 && ebda_seg < 0xa000)
-+ dosmem = ebda_seg << 4;
-+ else
-+ dosmem = 640 * 1024; /* Hope for the best... */
-+ }
-+ rv = callback(data, bios_data, dosmem - bios_data, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ /* First try INT 15h AX=E820h */
-+ e820buf = lzalloc(sizeof *e820buf);
-+ if (!e820buf)
-+ return -1;
-+
-+ ireg.eax.l = 0xe820;
-+ ireg.edx.l = 0x534d4150;
-+ ireg.ebx.l = 0;
-+ ireg.ecx.l = sizeof(*e820buf);
-+ ireg.es = SEG(e820buf);
-+ ireg.edi.w[0] = OFFS(e820buf);
-+
-+ do {
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if ((oreg.eflags.l & EFLAGS_CF) ||
-+ (oreg.eax.l != 0x534d4150) || (oreg.ecx.l < 20))
-+ break;
-+
-+ start = e820buf->start;
-+ len = e820buf->len;
-+
-+ if (start < 0x100000000ULL) {
-+ /* Don't rely on E820 being valid for low memory. Doing so
-+ could mean stuff like overwriting the PXE stack even when
-+ using "keeppxe", etc. */
-+ if (start < 0x100000ULL) {
-+ if (len > 0x100000ULL - start)
-+ len -= 0x100000ULL - start;
-+ else
-+ len = 0;
-+ start = 0x100000ULL;
-+ }
-+
-+ maxlen = 0x100000000ULL - start;
-+ if (len > maxlen)
-+ len = maxlen;
-+
-+ if (len) {
-+ enum syslinux_memmap_types type;
-+
-+ type = e820buf->type == 1 ? SMT_FREE : SMT_RESERVED;
-+ rv = callback(data, (addr_t) start, (addr_t) len, type);
-+ if (rv)
-+ return rv;
-+ memfound = 1;
-+ }
-+ }
-+
-+ ireg.ebx.l = oreg.ebx.l;
-+ } while (oreg.ebx.l);
-+
-+ lfree(e820buf);
-+
-+ if (memfound)
-+ return 0;
-+
-+ /* Next try INT 15h AX=E801h */
-+ ireg.eax.w[0] = 0xe801;
-+ __intcall(0x15, &ireg, &oreg);
-+
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.ecx.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+
-+ if (oreg.edx.w[0]) {
-+ rv = callback(data, (addr_t) 16 << 20,
-+ oreg.edx.w[0] << 16, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+ }
-+
-+ /* Finally try INT 15h AH=88h */
-+ ireg.eax.w[0] = 0x8800;
-+ if (!(oreg.eflags.l & EFLAGS_CF) && oreg.eax.w[0]) {
-+ rv = callback(data, (addr_t) 1 << 20, oreg.ecx.w[0] << 10, SMT_FREE);
-+ if (rv)
-+ return rv;
-+ }
-+
-+ return 0;
-+}
-+
-+static struct syslinux_memscan bios_memscan = {
-+ .func = bios_scan_memory,
-+};
-+
- void bios_init(void)
- {
- int i;
-@@ -515,6 +638,7 @@ void bios_init(void)
-
- /* Init the memory subsystem */
- bios_free_mem = (uint16_t *)0x413;
-+ syslinux_memscan_add(&bios_memscan);
- mem_init();
-
- /* CPU-dependent initialization and related checks. */
-@@ -534,7 +658,6 @@ struct mem_ops bios_mem_ops = {
- .malloc = bios_malloc,
- .realloc = bios_realloc,
- .free = bios_free,
-- .scan_memory = bios_scan_memory,
- };
-
- struct firmware bios_fw = {
-diff --git a/efi/main.c b/efi/main.c
-index 13b9403..fb8cf05 100644
---- a/efi/main.c
-+++ b/efi/main.c
-@@ -296,21 +296,21 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- for (i = 0; i < nr_entries; bufpos += desc_sz, i++) {
- EFI_MEMORY_DESCRIPTOR *m;
- UINT64 region_sz;
-- int valid;
-+ enum syslinux_memmap_types type;
-
- m = (EFI_MEMORY_DESCRIPTOR *)bufpos;
- region_sz = m->NumberOfPages * EFI_PAGE_SIZE;
-
- switch (m->Type) {
- case EfiConventionalMemory:
-- valid = 1;
-+ type = SMT_FREE;
- break;
- default:
-- valid = 0;
-+ type = SMT_RESERVED;
- break;
- }
-
-- rv = callback(data, m->PhysicalStart, region_sz, valid);
-+ rv = callback(data, m->PhysicalStart, region_sz, type);
- if (rv)
- break;
- }
-@@ -319,11 +319,16 @@ int efi_scan_memory(scan_memory_callback_t callback, void *data)
- return rv;
- }
-
-+static struct syslinux_memscan efi_memscan = {
-+ .func = efi_scan_memory,
-+};
-+
- extern uint16_t *bios_free_mem;
- void efi_init(void)
- {
- /* XXX timer */
- *bios_free_mem = 0;
-+ syslinux_memscan_add(&efi_memscan);
- mem_init();
- }
-
-@@ -1103,7 +1108,6 @@ struct mem_ops efi_mem_ops = {
- .malloc = efi_malloc,
- .realloc = efi_realloc,
- .free = efi_free,
-- .scan_memory = efi_scan_memory,
- };
-
- struct firmware efi_fw = {
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch b/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
deleted file mode 100644
index 70d65fd71d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0003-PXELINUX-Add-bios-memscan-function.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-Upstream-Status: Backport [d2f94e74fbd60bf491753895d2474105efb3dedf]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From 5d57e8eb46f209481069d70eaa778481f6fa3edb Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 17 Jul 2013 13:04:30 +0100
-Subject: [PATCH 3/4] PXELINUX: Add bios memscan function
-
-We can mark the memory region occupied by the PXE stack as SMT_TERMINAL
-provided that KeepPXE isn't set. Historically some very old
-non-relocatable kernel images (memtest86+) have a load address that
-falls within the PXE stack region, so we need to attempt to load into
-that region if at all possible.
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
----
- core/fs/pxe/bios.c | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 81aa715..5f61824 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -1,4 +1,5 @@
- #include <syslinux/firmware.h>
-+#include <syslinux/memscan.h>
- #include <core.h>
- #include "pxe.h"
- #include <net.h>
-@@ -10,6 +11,9 @@ static uint16_t real_base_mem; /* Amount of DOS memory after freeing */
- static bool has_gpxe;
- static uint32_t gpxe_funcs;
-
-+static addr_t pxe_code_start, pxe_code_size;
-+static addr_t pxe_data_start, pxe_data_size;
-+
- /*
- * Validity check on possible !PXE structure in buf
- * return 1 for success, 0 for failure.
-@@ -88,6 +92,29 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
- return memory_scan(0x10000, is_pxenv);
- }
-
-+static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
-+{
-+ int rv = 0;
-+
-+ /*
-+ * If we are planning on calling unload_pxe() and unmapping the PXE
-+ * region before we transfer control away from PXELINUX we can mark
-+ * that region as SMT_TERMINAL to indicate that the region will
-+ * become free at some point in the future.
-+ */
-+ if (!KeepPXE) {
-+ dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_code_start, pxe_code_start + pxe_code_size);
-+ rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
-+
-+ dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ pxe_data_start, pxe_data_start + pxe_data_size);
-+ rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-+ }
-+
-+ return rv;
-+}
-+
- /*
- * Find the !PXE structure; we search for the following, in order:
- *
-@@ -204,6 +231,14 @@ int pxe_init(bool quiet)
- printf("UNDI data segment at %04X len %04X\n", data_seg, data_len);
- }
-
-+ pxe_code_start = code_seg << 4;
-+ pxe_code_size = code_len;
-+
-+ pxe_data_start = data_seg << 4;
-+ pxe_data_size = data_len;
-+
-+ syslinux_memscan_new(pxelinux_scan_memory);
-+
- code_seg = code_seg + ((code_len + 15) >> 4);
- data_seg = data_seg + ((data_len + 15) >> 4);
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch b/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
deleted file mode 100644
index ee0a77237d..0000000000
--- a/meta/recipes-devtools/syslinux/files/0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-Status: Backport [c0ea15936de8378d1da6843d3dbddd8dddba1011]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-From f3347f9b09135d71a4effae1614b22dcdf16a7e2 Mon Sep 17 00:00:00 2001
-From: Matt Fleming <matt.fleming@intel.com>
-Date: Wed, 24 Jul 2013 18:33:14 +0100
-Subject: [PATCH 4/4] pxe: use bios_fbm() and real_base_mem to calculate free
- space
-
-We don't need to individually add the PXE regions, we already have two
-symbols that denote the memory region that will be freed when calling
-unload_pxe().
-
-This essentially reverts commit 03dda0f1 ("pxe: mark all PXE regions as
-SMT_TERMINAL").
-
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-
-Conflicts:
- core/fs/pxe/bios.c
----
- core/fs/pxe/bios.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/core/fs/pxe/bios.c b/core/fs/pxe/bios.c
-index 5f61824..ffdffaf 100644
---- a/core/fs/pxe/bios.c
-+++ b/core/fs/pxe/bios.c
-@@ -94,24 +94,24 @@ static const struct pxenv_t *memory_scan_for_pxenv_struct(void)
-
- static int pxelinux_scan_memory(scan_memory_callback_t callback, void *data)
- {
-+ addr_t start, size;
- int rv = 0;
-
-+ if (KeepPXE)
-+ return 0;
-+
- /*
- * If we are planning on calling unload_pxe() and unmapping the PXE
- * region before we transfer control away from PXELINUX we can mark
- * that region as SMT_TERMINAL to indicate that the region will
- * become free at some point in the future.
- */
-- if (!KeepPXE) {
-- dprintf("Marking PXE code region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_code_start, pxe_code_start + pxe_code_size);
-- rv = callback(data, pxe_code_start, pxe_code_size, SMT_TERMINAL);
--
-- dprintf("Marking PXE data region 0x%x - 0x%x as SMT_TERMINAL\n",
-- pxe_data_start, pxe_data_start + pxe_data_size);
-- rv = callback(data, pxe_data_start, pxe_data_size, SMT_TERMINAL);
-- }
-+ start = bios_fbm() << 10;
-+ size = (real_base_mem - bios_fbm()) << 10;
-+ dprintf("Marking PXE region 0x%x - 0x%x as SMT_TERMINAL\n",
-+ start, start + size);
-
-+ callback(data, start, size, SMT_TERMINAL);
- return rv;
- }
-
---
-1.8.5.3
-
diff --git a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch b/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
deleted file mode 100644
index 09a6945ba9..0000000000
--- a/meta/recipes-devtools/syslinux/files/isohybrid-fix-overflow-on-32-bit-system.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
-From bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1 Mon Sep 17 00:00:00 2001
-From: Kai Kang <kai.kang@windriver.com>
-Date: Fri, 20 Jun 2014 11:32:11 +0800
-Subject: [PATCH 1/2] isohybrid: fix overflow on 32 bit system
-
-When call isohybrid with option '-u', it overflows on a 32 bits host. It
-seeks to 512 bytes before the end of the image to install gpt header. If
-the size of image is larger than LONG_MAX, it overflows fseek() and
-cause error:
-
-isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument
-
-Replace fseek with fseeko to fix this issue.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- utils/isohybrid.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/isohybrid.c b/utils/isohybrid.c
-index 410bb60..23fc6c0 100644
---- a/utils/isohybrid.c
-+++ b/utils/isohybrid.c
-@@ -1126,7 +1126,7 @@ main(int argc, char *argv[])
- * end of the image
- */
-
-- if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
-+ if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size - 512,
- SEEK_SET))
- err(1, "%s: seek error - 8", argv[0]);
-
---
-1.9.1
-
diff --git a/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch b/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch
new file mode 100644
index 0000000000..3ab7875274
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch
@@ -0,0 +1,84 @@
+From 60f3833ab2b5899771b4eab654e88f9888b99501 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 16:01:55 +0800
+Subject: [PATCH 1/9] linux/syslinux: support ext2/3/4 device
+
+* Support ext2/3/4 deivce.
+* The open_ext2_fs() checks whether it is an ext2/3/4 device,
+ do the ext2/3/4 installation (install_to_ext2()) if yes, otherwise go
+ on to the fat/ntfs.
+* The ext2/3/4 support doesn't require root privileges since it doesn't need
+ mount (but write permission is required).
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index 912de71..36fc202 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -256,6 +256,23 @@ int do_open_file(char *name)
+ return fd;
+ }
+
++/*
++ * Check whether the device contains an ext2, ext3 or ext4 fs and open it if
++ * true.
++ * return value:
++ * 0: Everything is OK
++ * 1: Not an ext2, ext3 or ext4
++ * -1: unexpected error
++ */
++static int open_ext2_fs(const char *device, const char *subdir)
++{
++}
++
++/* The install func for ext2, ext3 and ext4 */
++static int install_to_ext2(const char *device, int dev_fd, const char *subdir)
++{
++}
++
+ int main(int argc, char *argv[])
+ {
+ static unsigned char sectbuf[SECTOR_SIZE];
+@@ -313,6 +330,24 @@ int main(int argc, char *argv[])
+ die("can't combine an offset with a block device");
+ }
+
++ /*
++ * Check if it is an ext2, ext3 or ext4
++ */
++ rv = open_ext2_fs(opt.device, subdir);
++ if (rv == 0) {
++ if (install_to_ext2(opt.device, dev_fd, subdir)) {
++ fprintf(stderr, "%s: installation failed\n", opt.device);
++ exit(1);
++ }
++ return 0;
++ /* Unexpected errors */
++ } else if (rv == -1) {
++ exit(1);
++ }
++
++ /* Reset rv */
++ rv = 0;
++
+ xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset);
+ fsync(dev_fd);
+
+@@ -322,6 +357,7 @@ int main(int argc, char *argv[])
+ */
+ if ((errmsg = syslinux_check_bootsect(sectbuf, &fs_type))) {
+ fprintf(stderr, "%s: %s\n", opt.device, errmsg);
++ fprintf(stderr, "%s: supported fs: fat/ntfs/ext2/ex3/ext4\n", program);
+ exit(1);
+ }
+
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0002-linux-syslinux-implement-open_ext2_fs.patch b/meta/recipes-devtools/syslinux/syslinux/0002-linux-syslinux-implement-open_ext2_fs.patch
new file mode 100644
index 0000000000..77cf060451
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0002-linux-syslinux-implement-open_ext2_fs.patch
@@ -0,0 +1,141 @@
+From 07fb737fb60c08eaaa41989d531fc23009523546 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 16:09:18 +0800
+Subject: [PATCH 2/9] linux/syslinux: implement open_ext2_fs()
+
+The open_ext2_fs() checks whether it is an ext2/ext3/ext4 device, and
+return:
+0: It is an ext2, ext3 or ext4.
+1: Not an ext2, ext3 or ext4.
+-1: unexpected error.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/Makefile | 2 +-
+ linux/syslinux.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 81 insertions(+), 1 deletion(-)
+
+diff --git a/linux/Makefile b/linux/Makefile
+index 11667e1..ac1ac58 100644
+--- a/linux/Makefile
++++ b/linux/Makefile
+@@ -51,7 +51,7 @@ spotless: clean
+ installer: syslinux syslinux-nomtools
+
+ syslinux: $(OBJS)
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC) $(LDFLAGS) -o $@ $^ -lext2fs
+
+ syslinux-nomtools: syslinux
+ ln -f $< $@
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index 36fc202..cc4e7da 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -72,6 +72,7 @@
+ #include "syslxfs.h"
+ #include "setadv.h"
+ #include "syslxopt.h" /* unified options */
++#include <ext2fs/ext2fs.h>
+
+ extern const char *program; /* Name of program */
+
+@@ -82,6 +83,9 @@ char *mntpath = NULL; /* Path on which to mount */
+ int loop_fd = -1; /* Loop device */
+ #endif
+
++ext2_filsys e2fs = NULL; /* Ext2/3/4 filesystem */
++ext2_ino_t root, cwd; /* The root and cwd of e2fs */
++
+ void __attribute__ ((noreturn)) die(const char *msg)
+ {
+ fprintf(stderr, "%s: %s\n", program, msg);
+@@ -266,6 +270,82 @@ int do_open_file(char *name)
+ */
+ static int open_ext2_fs(const char *device, const char *subdir)
+ {
++ int retval;
++ int open_flag = EXT2_FLAG_RW, mount_flags;
++ ext2_ino_t dirino;
++ char opt_string[40];
++
++ if (opt.offset) {
++ sprintf(opt_string, "offset=%llu", (unsigned long long)opt.offset);
++ retval = ext2fs_open2(device, opt_string, open_flag, 0, 0, unix_io_manager, &e2fs);
++ } else
++ retval = ext2fs_open(device, open_flag, 0, 0, unix_io_manager, &e2fs);
++ if (retval) {
++ /* It might not be an extN fs, so we need check magic firstly */
++ if (retval == EXT2_ET_BAD_MAGIC) {
++ /* Do nothing, return silently */
++ return 1;
++ } else {
++ fprintf(stderr, "%s: error while trying to open: %s\n",
++ program, device);
++ return -1;
++ }
++ }
++
++ /* Stop if it is mounted */
++ retval = ext2fs_check_if_mounted(device, &mount_flags);
++ if (retval) {
++ fprintf(stderr, "%s: ext2fs_check_if_mount() error on %s\n",
++ program, device);
++ goto fail;
++ }
++
++ if (mount_flags & EXT2_MF_MOUNTED) {
++ fprintf(stderr, "%s: %s is mounted\n", program, device);
++ goto fail;
++ }
++
++ e2fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
++
++ /* Read the inode map */
++ retval = ext2fs_read_inode_bitmap(e2fs);
++ if (retval) {
++ fprintf(stderr, "%s: while reading inode bitmap: %s\n",
++ program, device);
++ goto fail;
++ }
++
++ /* Read the block map */
++ retval = ext2fs_read_block_bitmap(e2fs);
++ if (retval) {
++ fprintf(stderr, "%s: while reading block bitmap: %s\n",
++ program, device);
++ goto fail;
++ }
++
++ root = cwd = EXT2_ROOT_INO;
++ /* Check the subdir */
++ if (strcmp(subdir, "/")) {
++ retval = ext2fs_namei(e2fs, root, cwd, subdir, &dirino);
++ if (retval) {
++ fprintf(stderr, "%s: failed to find dir %s on %s\n",
++ program, subdir, device);
++ goto fail;
++ }
++
++ retval = ext2fs_check_directory(e2fs, dirino);
++ if (retval) {
++ fprintf(stderr, "%s: failed to cd to: %s\n", program, subdir);
++ goto fail;
++ }
++ cwd = dirino;
++ }
++
++ return 0;
++
++fail:
++ (void) ext2fs_close(e2fs);
++ return -1;
+ }
+
+ /* The install func for ext2, ext3 and ext4 */
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0003-linux-syslinux-implement-install_to_ext2.patch b/meta/recipes-devtools/syslinux/syslinux/0003-linux-syslinux-implement-install_to_ext2.patch
new file mode 100644
index 0000000000..84ba10526a
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0003-linux-syslinux-implement-install_to_ext2.patch
@@ -0,0 +1,116 @@
+From 64d856b243812907068776b204a003a3a8fa122a Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 16:17:42 +0800
+Subject: [PATCH 3/9] linux/syslinux: implement install_to_ext2()
+
+* The handle_adv_on_ext() checks whether we only need update adv.
+* The write_to_ext() installs files (ldlinux.sys or ldlinux.c32) to the
+ device.
+* The install_bootblock() installs the boot block.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 79 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index cc4e7da..45f080d 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -346,11 +346,90 @@ static int open_ext2_fs(const char *device, const char *subdir)
+ fail:
+ (void) ext2fs_close(e2fs);
+ return -1;
++
++}
++
++/*
++ * Install the boot block on the specified device.
++ * Must be run AFTER file installed.
++ */
++int install_bootblock(int fd, const char *device)
++{
++}
++
++static int handle_adv_on_ext(void)
++{
++}
++
++/* Write files, adv, boot sector */
++static int write_to_ext(const char *filename, const char *str, int length,
++ int i_flags, int dev_fd, const char *subdir)
++{
+ }
+
+ /* The install func for ext2, ext3 and ext4 */
+ static int install_to_ext2(const char *device, int dev_fd, const char *subdir)
+ {
++ int retval;
++ ext2_ino_t oldino;
++
++ const char *file = "ldlinux.sys";
++ const char *oldfile = "extlinux.sys";
++ const char *c32file = "ldlinux.c32";
++
++ /* Handle the adv */
++ if (handle_adv_on_ext() < 0) {
++ fprintf(stderr, "%s: error while handling ADV on %s\n",
++ program, device);
++ retval = 1;
++ goto fail;
++ }
++
++ /* Return if only need update the adv */
++ if (opt.update_only == -1) {
++ return ext2fs_close(e2fs);
++ }
++
++ /* Write ldlinux.sys, adv, boot sector */
++ retval = write_to_ext(file, (const char _force *)boot_image,
++ boot_image_len, EXT2_IMMUTABLE_FL, dev_fd, subdir);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: while writing: %s.\n",
++ program, file);
++ goto fail;
++ }
++
++ /* Write ldlinux.c32 */
++ retval = write_to_ext(c32file,
++ (const char _force *)syslinux_ldlinuxc32,
++ syslinux_ldlinuxc32_len, 0, dev_fd, subdir);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: while writing: %s.\n",
++ program, c32file);
++ goto fail;
++ }
++
++ /* Look if we have the extlinux.sys and remove it*/
++ retval = ext2fs_namei(e2fs, root, cwd, oldfile, &oldino);
++ if (retval == 0) {
++ retval = ext2fs_unlink(e2fs, cwd, oldfile, oldino, 0);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: failed to unlink: %s\n",
++ program, oldfile);
++ goto fail;
++ }
++ } else {
++ retval = 0;
++ }
++
++ sync();
++ retval = install_bootblock(dev_fd, device);
++ close(dev_fd);
++ sync();
++
++fail:
++ (void) ext2fs_close(e2fs);
++ return retval;
+ }
+
+ int main(int argc, char *argv[])
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch b/meta/recipes-devtools/syslinux/syslinux/0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch
new file mode 100644
index 0000000000..64b56d92e0
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch
@@ -0,0 +1,91 @@
+From 35d3842cc4b930c5102eed2921e0189b7f4fd069 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 16:43:37 +0800
+Subject: [PATCH 4/9] linux/syslinux: add ext_file_read() and ext_file_write()
+
+Will use them to read and write on the extX device.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 62 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index 45f080d..247c86a 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -349,6 +349,68 @@ fail:
+
+ }
+
++/* Read from an ext2_file */
++static int ext_file_read(ext2_file_t e2_file, void *buf, size_t count,
++ off_t offset, const char *msg)
++{
++ int retval;
++ char *ptr = (char *) buf;
++ unsigned int got = 0;
++ size_t done = 0;
++
++ /* Always lseek since e2_file is uncontrolled by this func */
++ if (ext2fs_file_lseek(e2_file, offset, EXT2_SEEK_SET, NULL)) {
++ fprintf(stderr, "%s: ext2fs_file_lseek() failed.\n",
++ program);
++ return -1;
++ }
++
++ while (1) {
++ retval = ext2fs_file_read(e2_file, ptr, count, &got);
++ if (retval) {
++ fprintf(stderr, "%s: error while reading %s\n",
++ program, msg);
++ return -1;
++ }
++ count -= got;
++ ptr += got;
++ done += got;
++ if (got == 0 || count == 0)
++ break;
++ }
++
++ return done;
++}
++
++/* Write to an ext2_file */
++static int ext_file_write(ext2_file_t e2_file, const void *buf, size_t count,
++ off_t offset)
++{
++ const char *ptr = (const char *) buf;
++ unsigned int written = 0;
++ size_t done = 0;
++
++ /* Always lseek since e2_file is uncontrolled by this func */
++ if (ext2fs_file_lseek(e2_file, offset, EXT2_SEEK_SET, NULL)) {
++ fprintf(stderr, "%s: ext2fs_file_lseek() failed.\n",
++ program);
++ return -1;
++ }
++
++ while (count > 0) {
++ if (ext2fs_file_write(e2_file, ptr, count, &written)) {
++ fprintf(stderr, "%s: failed to write syslinux adv.\n",
++ program);
++ return -1;
++ }
++ count -= written;
++ ptr += written;
++ done += written;
++ }
++
++ return done;
++}
++
+ /*
+ * Install the boot block on the specified device.
+ * Must be run AFTER file installed.
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0005-linux-syslinux-implement-handle_adv_on_ext.patch b/meta/recipes-devtools/syslinux/syslinux/0005-linux-syslinux-implement-handle_adv_on_ext.patch
new file mode 100644
index 0000000000..829e7c4ca1
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0005-linux-syslinux-implement-handle_adv_on_ext.patch
@@ -0,0 +1,127 @@
+From cdb980b37f40dc2c41891434c7736e49da53756e Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 16:47:52 +0800
+Subject: [PATCH 5/9] linux/syslinux: implement handle_adv_on_ext()
+
+It reads adv if found on the device, or resets syslinux_adv, or update
+the adv if update adv only.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 97 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index 247c86a..de5d272 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -421,6 +421,103 @@ int install_bootblock(int fd, const char *device)
+
+ static int handle_adv_on_ext(void)
+ {
++ int i, retval, found_file;
++ int need_close = 2; /* 2 means no need extra close */
++ char *filenames[2] = {"ldlinux.sys", "extlinux.sys"};
++ char *filename;
++ ext2_ino_t newino;
++ ext2_file_t e2_file;
++ struct ext2_inode inode;
++
++ for (i = 0; i < 2; i++) {
++ filename = filenames[i];
++ found_file = 0;
++ retval = ext2fs_namei(e2fs, root, cwd, filename, &newino);
++ if (retval == 0) {
++ found_file = 1;
++ } else
++ continue;
++
++ need_close = i;
++
++ retval = ext2fs_file_open(e2fs, newino, EXT2_FLAG_RW, &e2_file);
++ if (retval) {
++ fprintf(stderr, "%s: failed to open %s\n",
++ program, filename);
++ goto fail;
++ }
++
++ retval = ext2fs_read_inode(e2fs, newino, &inode);
++ if (retval) {
++ fprintf(stderr, "%s: error while reading inode: %u, file: %s\n",
++ program, newino, filename);
++ goto fail;
++ }
++
++ /* Check the size to see if too small to read */
++ if (inode.i_size < 2 * ADV_SIZE) {
++ if (opt.update_only == -1) {
++ fprintf(stderr, "%s: failed to write auxilliary data\n\
++ the size of %s is too small (need --update)?\n",
++ program, filename);
++ retval = -1;
++ goto fail;
++ }
++ syslinux_reset_adv(syslinux_adv);
++ found_file = 0;
++ break;
++ }
++
++ /* Read the adv */
++ retval = ext_file_read(e2_file, syslinux_adv, 2 * ADV_SIZE,
++ inode.i_size - 2 * ADV_SIZE, "ADV");
++ if (retval == -1)
++ goto fail;
++ if (retval == 2 * ADV_SIZE) {
++ retval = syslinux_validate_adv(syslinux_adv);
++ /* Read the adv successfully */
++ if (retval == 0)
++ break;
++ }
++
++ /* Close the file if reaches here, otherwise we leave the file
++ * open in case we need write it */
++ need_close = 2;
++ retval = ext2fs_file_close(e2_file);
++ if (retval) {
++ fprintf(stderr, "%s: error while closing %s\n",
++ program, filename);
++ return retval;
++ }
++ }
++
++ if (!found_file) {
++ if (opt.update_only == -1) {
++ fprintf(stderr, "%s: no ldlinux.sys or extlinux.sys found on the device\n",
++ program);
++ return -1;
++ }
++ syslinux_reset_adv(syslinux_adv);
++ }
++
++ /* The modify_adv will reset the adv if opt.reset_adv */
++ if (modify_adv() < 0) {
++ fprintf(stderr, "%s: error while modifying adv\n", program);
++ retval = -1;
++ goto fail;
++ }
++
++ /* Write adv if update_only == -1 and found file */
++ if (opt.update_only == -1 && found_file) {
++ if (ext_file_write(e2_file, syslinux_adv, 2 * ADV_SIZE ,
++ inode.i_size - 2 * ADV_SIZE) == -1)
++ goto fail;
++ }
++
++fail:
++ if (need_close != 2)
++ (void) ext2fs_file_close(e2_file);
++ return retval;
+ }
+
+ /* Write files, adv, boot sector */
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch b/meta/recipes-devtools/syslinux/syslinux/0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch
new file mode 100644
index 0000000000..cba87252a5
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch
@@ -0,0 +1,215 @@
+From 922e56c10e36d876777580c84daef9a66bea6525 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 31 Dec 2014 17:20:43 +0800
+Subject: [PATCH 6/9] linux/syslinux: implement write_to_ext() and add
+ syslinuxext.c
+
+* The write_to_ext() write file to the extX device, and handle the boot
+ sector.
+* The syslinuxext.c is used for placing the code which are used by
+ extlinux and syslinux (which is syslinux_patch_bootsect()).
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ libinstaller/syslinuxext.c | 7 +++
+ libinstaller/syslinuxext.h | 5 ++
+ linux/Makefile | 3 +-
+ linux/syslinux.c | 118 +++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 132 insertions(+), 1 deletion(-)
+ create mode 100644 libinstaller/syslinuxext.c
+ create mode 100644 libinstaller/syslinuxext.h
+
+diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c
+new file mode 100644
+index 0000000..bb54cef
+--- /dev/null
++++ b/libinstaller/syslinuxext.c
+@@ -0,0 +1,7 @@
++#define _GNU_SOURCE
++
++/* Patch syslinux_bootsect */
++void syslinux_patch_bootsect(int dev_fd)
++{
++}
++
+diff --git a/libinstaller/syslinuxext.h b/libinstaller/syslinuxext.h
+new file mode 100644
+index 0000000..8abd8b9
+--- /dev/null
++++ b/libinstaller/syslinuxext.h
+@@ -0,0 +1,5 @@
++#ifndef EXT2_SUPER_OFFSET
++#define EXT2_SUPER_OFFSET 1024
++#endif
++
++void syslinux_patch_bootsect(int dev_fd);
+diff --git a/linux/Makefile b/linux/Makefile
+index ac1ac58..3b23867 100644
+--- a/linux/Makefile
++++ b/linux/Makefile
+@@ -30,7 +30,8 @@ SRCS = syslinux.c \
+ ../libinstaller/syslxmod.c \
+ ../libinstaller/bootsect_bin.c \
+ ../libinstaller/ldlinuxc32_bin.c \
+- ../libinstaller/ldlinux_bin.c
++ ../libinstaller/ldlinux_bin.c \
++ ../libinstaller/syslinuxext.c
+ OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
+
+ .SUFFIXES: .c .o .i .s .S
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index de5d272..f0c97a8 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -46,6 +46,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/mount.h>
++#include <time.h>
+
+ #include "linuxioctl.h"
+
+@@ -72,6 +73,7 @@
+ #include "syslxfs.h"
+ #include "setadv.h"
+ #include "syslxopt.h" /* unified options */
++#include "syslinuxext.h"
+ #include <ext2fs/ext2fs.h>
+
+ extern const char *program; /* Name of program */
+@@ -419,6 +421,12 @@ int install_bootblock(int fd, const char *device)
+ {
+ }
+
++/* Construct the boot file map */
++int ext_construct_sectmap_fs(ext2_filsys fs, ext2_ino_t newino,
++ sector_t *sectors, int nsect)
++{
++}
++
+ static int handle_adv_on_ext(void)
+ {
+ int i, retval, found_file;
+@@ -524,6 +532,116 @@ fail:
+ static int write_to_ext(const char *filename, const char *str, int length,
+ int i_flags, int dev_fd, const char *subdir)
+ {
++ ext2_ino_t newino;
++ struct ext2_inode inode;
++ int retval, i, modbytes, nsect;
++ ext2_file_t e2_file;
++ sector_t *sectors;
++
++ /* Remove it if it is already exists */
++ retval = ext2fs_namei(e2fs, root, cwd, filename, &newino);
++ if (retval == 0) {
++ retval = ext2fs_unlink(e2fs, cwd, filename, newino, 0);
++ if (retval) {
++ fprintf(stderr, "%s: failed to unlink: %s\n", program, filename);
++ return retval;
++ }
++ }
++
++ /* Create new inode */
++ retval = ext2fs_new_inode(e2fs, cwd, 010755, 0, &newino);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: failed to create inode for: %s\n",
++ program, filename);
++ return retval;
++ }
++
++ /* Link the inode and the filename */
++ retval = ext2fs_link(e2fs, cwd, filename, newino, EXT2_FT_REG_FILE);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: failed to link inode for: %s.\n",
++ program, filename);
++ return retval;
++ }
++
++ if (ext2fs_test_inode_bitmap2(e2fs->inode_map, newino))
++ fprintf(stderr, "%s: warning: inode already set %s.\n",
++ program, filename);
++
++ ext2fs_inode_alloc_stats2(e2fs, newino, +1, 0);
++ memset(&inode, 0, sizeof(inode));
++ inode.i_mode = LINUX_S_IFREG | LINUX_S_IRUSR | LINUX_S_IRGRP
++ | LINUX_S_IROTH;
++ inode.i_flags |= i_flags;
++ inode.i_atime = inode.i_ctime = inode.i_mtime =
++ e2fs->now ? e2fs->now : time(0);
++ inode.i_links_count = 1;
++ if (e2fs->super->s_feature_incompat &
++ EXT3_FEATURE_INCOMPAT_EXTENTS) {
++ struct ext3_extent_header *eh;
++
++ eh = (struct ext3_extent_header *) &inode.i_block[0];
++ eh->eh_depth = 0;
++ eh->eh_entries = 0;
++ eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
++ i = (sizeof(inode.i_block) - sizeof(*eh)) /
++ sizeof(struct ext3_extent);
++ eh->eh_max = ext2fs_cpu_to_le16(i);
++ inode.i_flags |= EXT4_EXTENTS_FL;
++ }
++
++ retval = ext2fs_write_new_inode(e2fs, newino, &inode);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: while writting inode %d.\n",
++ program, newino);
++ return 1;
++ }
++
++ retval = ext2fs_file_open(e2fs, newino, EXT2_FILE_WRITE, &e2_file);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: failed to open %s.\n",
++ program, filename);
++ return 1;
++ }
++
++ /* Write to file */
++ if (ext_file_write(e2_file, str, length, 0) == -1)
++ goto fail;
++
++ if (strcmp(filename, "ldlinux.sys") == 0) {
++ /* Write ADV */
++ if (ext_file_write(e2_file, syslinux_adv, 2 * ADV_SIZE,
++ boot_image_len) == -1)
++ goto fail;
++
++ /* Patch syslinux_bootsect */
++ syslinux_patch_bootsect(dev_fd);
++
++ /* Patch ldlinux.sys */
++ nsect = (boot_image_len + SECTOR_SIZE - 1) >> SECTOR_SHIFT;
++ nsect += 2; /* Two sectors for the ADV */
++ sectors = alloca(sizeof(sector_t) * nsect);
++ memset(sectors, 0, nsect * sizeof *sectors);
++ /* The sectors will be modified and used by syslinux_patch() */
++ retval = ext_construct_sectmap_fs(e2fs, newino, sectors, nsect);
++ if (retval)
++ goto fail;
++
++ /* Create the modified image in memory */
++ modbytes = syslinux_patch(sectors, nsect, opt.stupid_mode,
++ opt.raid_mode, subdir, NULL);
++
++ /* Rewrite the first modbytes of ldlinux.sys */
++ if (ext_file_write(e2_file, str, modbytes, 0) == -1) {
++ fprintf(stderr, "%s: ERROR: failed to patch %s.\n", program,
++ filename);
++ goto fail;
++ }
++ }
++
++fail:
++ (void) ext2fs_file_close(e2_file);
++ return retval;
+ }
+
+ /* The install func for ext2, ext3 and ext4 */
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch b/meta/recipes-devtools/syslinux/syslinux/0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch
new file mode 100644
index 0000000000..3913811917
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch
@@ -0,0 +1,84 @@
+From a95b831e18dd123f859bc5e6c4cecdcc0184ee37 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 2 Jan 2015 12:18:02 +0800
+Subject: [PATCH 7/9] linux/syslinux: implement ext_construct_sectmap_fs()
+
+The ext_construct_sectmap_fs() constucts the sector according to the
+bmap.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index f0c97a8..c741750 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -421,10 +421,60 @@ int install_bootblock(int fd, const char *device)
+ {
+ }
+
++/* The file's block count */
++int block_count = 0;
++static int get_block_count(ext2_filsys fs EXT2FS_ATTR((unused)),
++ blk64_t *blocknr EXT2FS_ATTR((unused)),
++ e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
++ blk64_t ref_block EXT2FS_ATTR((unused)),
++ int ref_offset EXT2FS_ATTR((unused)),
++ void *private EXT2FS_ATTR((unused)))
++{
++ block_count++;
++ return 0;
++}
++
+ /* Construct the boot file map */
+ int ext_construct_sectmap_fs(ext2_filsys fs, ext2_ino_t newino,
+ sector_t *sectors, int nsect)
+ {
++ blk64_t pblk, blksize, blk = 0;
++ sector_t sec;
++ unsigned int i;
++ int retval;
++
++ blksize = fs->blocksize;
++ blksize >>= SECTOR_SHIFT;
++
++ /* Get the total blocks no. */
++ retval = ext2fs_block_iterate3(fs, newino, BLOCK_FLAG_READ_ONLY,
++ NULL, get_block_count, NULL);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: ext2fs_block_iterate3() failed.\n", program);
++ return -1;
++ }
++
++ while (nsect) {
++ if (block_count-- == 0)
++ break;
++
++ /* Get the physical block no. (bmap) */
++ retval = ext2fs_bmap2(fs, newino, 0, 0, 0, blk, 0, &pblk);
++ if (retval) {
++ fprintf(stderr, "%s: ERROR: ext2fs_bmap2() failed.\n", program);
++ return -1;
++ }
++
++ blk++;
++ sec = (sector_t)pblk * blksize;
++ for (i = 0; i < blksize; i++) {
++ *sectors++ = sec++;
++ if (! --nsect)
++ break;
++ }
++ }
++
++ return 0;
+ }
+
+ static int handle_adv_on_ext(void)
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
new file mode 100644
index 0000000000..2400c98d6a
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
@@ -0,0 +1,427 @@
+From 78d76b87a4b855e6b661ae457283a63f385c04c9 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 2 Jan 2015 12:26:46 +0800
+Subject: [PATCH 8/9] libinstaller/syslinuxext: implement
+ syslinux_patch_bootsect()
+
+Move the related from extlinux/main.c to libinstaller/syslinuxext.c, the
+syslinux_patch_bootsect() are used by both extlinux/main.c and
+linux/syslinux.c.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ extlinux/Makefile | 3 +-
+ extlinux/main.c | 167 +-------------------------------------------
+ libinstaller/syslinuxext.c | 170 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 175 insertions(+), 165 deletions(-)
+
+diff --git a/extlinux/Makefile b/extlinux/Makefile
+index 02d1db5..90dd92f 100644
+--- a/extlinux/Makefile
++++ b/extlinux/Makefile
+@@ -31,7 +31,8 @@ SRCS = main.c \
+ ../libinstaller/advio.c \
+ ../libinstaller/bootsect_bin.c \
+ ../libinstaller/ldlinuxc32_bin.c \
+- ../libinstaller/ldlinux_bin.c
++ ../libinstaller/ldlinux_bin.c \
++ ../libinstaller/syslinuxext.c
+ OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
+
+ .SUFFIXES: .c .o .i .s .S
+diff --git a/extlinux/main.c b/extlinux/main.c
+index 09740bd..6fe026e 100644
+--- a/extlinux/main.c
++++ b/extlinux/main.c
+@@ -60,6 +60,7 @@
+ #include "setadv.h"
+ #include "syslxopt.h" /* unified options */
+ #include "mountinfo.h"
++#include "syslinuxext.h"
+
+ #ifdef DEBUG
+ # define dprintf printf
+@@ -67,10 +68,6 @@
+ # define dprintf(...) ((void)0)
+ #endif
+
+-#ifndef EXT2_SUPER_OFFSET
+-#define EXT2_SUPER_OFFSET 1024
+-#endif
+-
+ /* Since we have unused 2048 bytes in the primary AG of an XFS partition,
+ * we will use the first 0~512 bytes starting from 2048 for the Syslinux
+ * boot sector.
+@@ -92,136 +89,6 @@ static char subvol[BTRFS_SUBVOL_MAX];
+ - 2*ADV_SIZE)
+
+ /*
+- * Get the size of a block device
+- */
+-static uint64_t get_size(int devfd)
+-{
+- uint64_t bytes;
+- uint32_t sects;
+- struct stat st;
+-
+-#ifdef BLKGETSIZE64
+- if (!ioctl(devfd, BLKGETSIZE64, &bytes))
+- return bytes;
+-#endif
+- if (!ioctl(devfd, BLKGETSIZE, &sects))
+- return (uint64_t) sects << 9;
+- else if (!fstat(devfd, &st) && st.st_size)
+- return st.st_size;
+- else
+- return 0;
+-}
+-
+-/*
+- * Get device geometry and partition offset
+- */
+-struct geometry_table {
+- uint64_t bytes;
+- struct hd_geometry g;
+-};
+-
+-static int sysfs_get_offset(int devfd, unsigned long *start)
+-{
+- struct stat st;
+- char sysfs_name[128];
+- FILE *f;
+- int rv;
+-
+- if (fstat(devfd, &st))
+- return -1;
+-
+- if ((size_t)snprintf(sysfs_name, sizeof sysfs_name,
+- "/sys/dev/block/%u:%u/start",
+- major(st.st_rdev), minor(st.st_rdev))
+- >= sizeof sysfs_name)
+- return -1;
+-
+- f = fopen(sysfs_name, "r");
+- if (!f)
+- return -1;
+-
+- rv = fscanf(f, "%lu", start);
+- fclose(f);
+-
+- return (rv == 1) ? 0 : -1;
+-}
+-
+-/* Standard floppy disk geometries, plus LS-120. Zipdisk geometry
+- (x/64/32) is the final fallback. I don't know what LS-240 has
+- as its geometry, since I don't have one and don't know anyone that does,
+- and Google wasn't helpful... */
+-static const struct geometry_table standard_geometries[] = {
+- {360 * 1024, {2, 9, 40, 0}},
+- {720 * 1024, {2, 9, 80, 0}},
+- {1200 * 1024, {2, 15, 80, 0}},
+- {1440 * 1024, {2, 18, 80, 0}},
+- {1680 * 1024, {2, 21, 80, 0}},
+- {1722 * 1024, {2, 21, 80, 0}},
+- {2880 * 1024, {2, 36, 80, 0}},
+- {3840 * 1024, {2, 48, 80, 0}},
+- {123264 * 1024, {8, 32, 963, 0}}, /* LS120 */
+- {0, {0, 0, 0, 0}}
+-};
+-
+-int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo)
+-{
+- struct floppy_struct fd_str;
+- struct loop_info li;
+- struct loop_info64 li64;
+- const struct geometry_table *gp;
+- int rv = 0;
+-
+- memset(geo, 0, sizeof *geo);
+-
+- if (!ioctl(devfd, HDIO_GETGEO, geo)) {
+- goto ok;
+- } else if (!ioctl(devfd, FDGETPRM, &fd_str)) {
+- geo->heads = fd_str.head;
+- geo->sectors = fd_str.sect;
+- geo->cylinders = fd_str.track;
+- geo->start = 0;
+- goto ok;
+- }
+-
+- /* Didn't work. Let's see if this is one of the standard geometries */
+- for (gp = standard_geometries; gp->bytes; gp++) {
+- if (gp->bytes == totalbytes) {
+- memcpy(geo, &gp->g, sizeof *geo);
+- goto ok;
+- }
+- }
+-
+- /* Didn't work either... assign a geometry of 64 heads, 32 sectors; this is
+- what zipdisks use, so this would help if someone has a USB key that
+- they're booting in USB-ZIP mode. */
+-
+- geo->heads = opt.heads ? : 64;
+- geo->sectors = opt.sectors ? : 32;
+- geo->cylinders = totalbytes / (geo->heads * geo->sectors << SECTOR_SHIFT);
+- geo->start = 0;
+-
+- if (!opt.sectors && !opt.heads) {
+- fprintf(stderr,
+- "Warning: unable to obtain device geometry (defaulting to %d heads, %d sectors)\n"
+- " (on hard disks, this is usually harmless.)\n",
+- geo->heads, geo->sectors);
+- rv = 1; /* Suboptimal result */
+- }
+-
+-ok:
+- /* If this is a loopback device, try to set the start */
+- if (!ioctl(devfd, LOOP_GET_STATUS64, &li64))
+- geo->start = li64.lo_offset >> SECTOR_SHIFT;
+- else if (!ioctl(devfd, LOOP_GET_STATUS, &li))
+- geo->start = (unsigned int)li.lo_offset >> SECTOR_SHIFT;
+- else if (!sysfs_get_offset(devfd, &geo->start)) {
+- /* OK */
+- }
+-
+- return rv;
+-}
+-
+-/*
+ * Query the device geometry and put it into the boot sector.
+ * Map the file and put the map in the boot sector and file.
+ * Stick the "current directory" inode number into the file.
+@@ -231,11 +98,8 @@ ok:
+ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
+ {
+ struct stat dirst, xdst;
+- struct hd_geometry geo;
+ sector_t *sectp;
+- uint64_t totalbytes, totalsectors;
+ int nsect;
+- struct fat_boot_sector *sbs;
+ char *dirpath, *subpath, *xdirpath;
+ int rv;
+
+@@ -279,33 +143,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
+ /* Now subpath should contain the path relative to the fs base */
+ dprintf("subpath = %s\n", subpath);
+
+- totalbytes = get_size(devfd);
+- get_geometry(devfd, totalbytes, &geo);
+-
+- if (opt.heads)
+- geo.heads = opt.heads;
+- if (opt.sectors)
+- geo.sectors = opt.sectors;
+-
+- /* Patch this into a fake FAT superblock. This isn't because
+- FAT is a good format in any way, it's because it lets the
+- early bootstrap share code with the FAT version. */
+- dprintf("heads = %u, sect = %u\n", geo.heads, geo.sectors);
+-
+- sbs = (struct fat_boot_sector *)syslinux_bootsect;
+-
+- totalsectors = totalbytes >> SECTOR_SHIFT;
+- if (totalsectors >= 65536) {
+- set_16(&sbs->bsSectors, 0);
+- } else {
+- set_16(&sbs->bsSectors, totalsectors);
+- }
+- set_32(&sbs->bsHugeSectors, totalsectors);
+-
+- set_16(&sbs->bsBytesPerSec, SECTOR_SIZE);
+- set_16(&sbs->bsSecPerTrack, geo.sectors);
+- set_16(&sbs->bsHeads, geo.heads);
+- set_32(&sbs->bsHiddenSecs, geo.start);
++ /* Patch syslinux_bootsect */
++ syslinux_patch_bootsect(devfd);
+
+ /* Construct the boot file map */
+
+diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c
+index bb54cef..5a4423b 100644
+--- a/libinstaller/syslinuxext.c
++++ b/libinstaller/syslinuxext.c
+@@ -1,7 +1,177 @@
+ #define _GNU_SOURCE
+
++#include <sys/stat.h>
++#include <sys/types.h>
++#include <getopt.h>
++#include <ext2fs/ext2fs.h>
++
++#include "linuxioctl.h"
++#include "syslinux.h"
++#include "syslxint.h"
++#include "syslxopt.h"
++
++/*
++ * Get the size of a block device
++ */
++static uint64_t get_size(int dev_fd)
++{
++ uint64_t bytes;
++ uint32_t sects;
++ struct stat st;
++
++#ifdef BLKGETSIZE64
++ if (!ioctl(dev_fd, BLKGETSIZE64, &bytes))
++ return bytes;
++#endif
++ if (!ioctl(dev_fd, BLKGETSIZE, &sects))
++ return (uint64_t) sects << 9;
++ else if (!fstat(dev_fd, &st) && st.st_size)
++ return st.st_size;
++ else
++ return 0;
++}
++
++/*
++ * Get device geometry and partition offset
++ */
++static struct geometry_table {
++ uint64_t bytes;
++ struct hd_geometry g;
++};
++
++static int sysfs_get_offset(int dev_fd, unsigned long *start)
++{
++ struct stat st;
++ char sysfs_name[128];
++ FILE *f;
++ int rv;
++
++ if (fstat(dev_fd, &st))
++ return -1;
++
++ if ((size_t)snprintf(sysfs_name, sizeof sysfs_name,
++ "/sys/dev/block/%u:%u/start",
++ major(st.st_rdev), minor(st.st_rdev))
++ >= sizeof sysfs_name)
++ return -1;
++
++ f = fopen(sysfs_name, "r");
++ if (!f)
++ return -1;
++
++ rv = fscanf(f, "%lu", start);
++ fclose(f);
++
++ return (rv == 1) ? 0 : -1;
++}
++
++/* Standard floppy disk geometries, plus LS-120. Zipdisk geometry
++ (x/64/32) is the final fallback. I don't know what LS-240 has
++ as its geometry, since I don't have one and don't know anyone that does,
++ and Google wasn't helpful... */
++static const struct geometry_table standard_geometries[] = {
++ {360 * 1024, {2, 9, 40, 0}},
++ {720 * 1024, {2, 9, 80, 0}},
++ {1200 * 1024, {2, 15, 80, 0}},
++ {1440 * 1024, {2, 18, 80, 0}},
++ {1680 * 1024, {2, 21, 80, 0}},
++ {1722 * 1024, {2, 21, 80, 0}},
++ {2880 * 1024, {2, 36, 80, 0}},
++ {3840 * 1024, {2, 48, 80, 0}},
++ {123264 * 1024, {8, 32, 963, 0}}, /* LS120 */
++ {0, {0, 0, 0, 0}}
++};
++
++static int get_geometry(int dev_fd, uint64_t totalbytes, struct hd_geometry *geo)
++{
++ struct floppy_struct fd_str;
++ struct loop_info li;
++ struct loop_info64 li64;
++ const struct geometry_table *gp;
++ int rv = 0;
++
++ memset(geo, 0, sizeof *geo);
++
++ if (!ioctl(dev_fd, HDIO_GETGEO, geo)) {
++ goto ok;
++ } else if (!ioctl(dev_fd, FDGETPRM, &fd_str)) {
++ geo->heads = fd_str.head;
++ geo->sectors = fd_str.sect;
++ geo->cylinders = fd_str.track;
++ geo->start = 0;
++ goto ok;
++ }
++
++ /* Didn't work. Let's see if this is one of the standard geometries */
++ for (gp = standard_geometries; gp->bytes; gp++) {
++ if (gp->bytes == totalbytes) {
++ memcpy(geo, &gp->g, sizeof *geo);
++ goto ok;
++ }
++ }
++
++ /* Didn't work either... assign a geometry of 64 heads, 32 sectors; this is
++ what zipdisks use, so this would help if someone has a USB key that
++ they're booting in USB-ZIP mode. */
++
++ geo->heads = opt.heads ? : 64;
++ geo->sectors = opt.sectors ? : 32;
++ geo->cylinders = totalbytes / (geo->heads * geo->sectors << SECTOR_SHIFT);
++ geo->start = 0;
++
++ if (!opt.sectors && !opt.heads) {
++ fprintf(stderr,
++ "Warning: unable to obtain device geometry (defaulting to %d heads, %d sectors)\n"
++ " (on hard disks, this is usually harmless.)\n",
++ geo->heads, geo->sectors);
++ rv = 1; /* Suboptimal result */
++ }
++
++ok:
++ /* If this is a loopback device, try to set the start */
++ if (!ioctl(dev_fd, LOOP_GET_STATUS64, &li64))
++ geo->start = li64.lo_offset >> SECTOR_SHIFT;
++ else if (!ioctl(dev_fd, LOOP_GET_STATUS, &li))
++ geo->start = (unsigned int)li.lo_offset >> SECTOR_SHIFT;
++ else if (!sysfs_get_offset(dev_fd, &geo->start)) {
++ /* OK */
++ }
++
++ return rv;
++}
++
++
+ /* Patch syslinux_bootsect */
+ void syslinux_patch_bootsect(int dev_fd)
+ {
++ uint64_t totalbytes, totalsectors;
++ struct hd_geometry geo;
++ struct fat_boot_sector *sbs;
++
++ totalbytes = get_size(dev_fd);
++ get_geometry(dev_fd, totalbytes, &geo);
++
++ if (opt.heads)
++ geo.heads = opt.heads;
++ if (opt.sectors)
++ geo.sectors = opt.sectors;
++
++ /* Patch this into a fake FAT superblock. This isn't because
++ FAT is a good format in any way, it's because it lets the
++ early bootstrap share code with the FAT version. */
++ sbs = (struct fat_boot_sector *)syslinux_bootsect;
++
++ totalsectors = totalbytes >> SECTOR_SHIFT;
++ if (totalsectors >= 65536) {
++ set_16(&sbs->bsSectors, 0);
++ } else {
++ set_16(&sbs->bsSectors, totalsectors);
++ }
++ set_32(&sbs->bsHugeSectors, totalsectors);
++
++ set_16(&sbs->bsBytesPerSec, SECTOR_SIZE);
++ set_16(&sbs->bsSecPerTrack, geo.sectors);
++ set_16(&sbs->bsHeads, geo.heads);
++ set_32(&sbs->bsHiddenSecs, geo.start);
+ }
+
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/syslinux/0009-linux-syslinux-implement-install_bootblock.patch b/meta/recipes-devtools/syslinux/syslinux/0009-linux-syslinux-implement-install_bootblock.patch
new file mode 100644
index 0000000000..cd89d92485
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0009-linux-syslinux-implement-install_bootblock.patch
@@ -0,0 +1,50 @@
+From 76c465e87312dbc6cffd05427f1f4d2ebdee4f13 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 2 Jan 2015 12:28:35 +0800
+Subject: [PATCH 9/9] linux/syslinux: implement install_bootblock()
+
+Refer to the install_bootblock() in extlinux/main.c to make
+linux/syslinux.c's install_bootblock() which only supports ext2/3/4.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Tested-by: Du Dolpher <dolpher.du@intel.com>
+---
+ linux/syslinux.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/linux/syslinux.c b/linux/syslinux.c
+index c741750..917f83a 100755
+--- a/linux/syslinux.c
++++ b/linux/syslinux.c
+@@ -419,6 +419,26 @@ static int ext_file_write(ext2_file_t e2_file, const void *buf, size_t count,
+ */
+ int install_bootblock(int fd, const char *device)
+ {
++ struct ext2_super_block sb;
++
++ if (xpread(fd, &sb, sizeof sb, EXT2_SUPER_OFFSET + opt.offset) != sizeof sb) {
++ perror("reading superblock");
++ return 1;
++ }
++
++ if (sb.s_magic != EXT2_SUPER_MAGIC) {
++ fprintf(stderr,
++ "no ext2/3/4 superblock found on %s\n", device);
++ return 1;
++ }
++
++ if (xpwrite(fd, syslinux_bootsect, syslinux_bootsect_len, 0)
++ != (signed)syslinux_bootsect_len) {
++ perror("writing bootblock");
++ return 1;
++ }
++
++ return 0;
+ }
+
+ /* The file's block count */
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
index 6b695791cd..312b1e8aed 100644
--- a/meta/recipes-devtools/syslinux/files/syslinux-fix-parallel-building-issue.patch
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch
@@ -24,15 +24,12 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
com32/Makefile | 1 +
1 file changed, 1 insertion(+)
-diff --git a/com32/Makefile b/com32/Makefile
-index 7ea1b01..9a1721b 100644
---- a/com32/Makefile
-+++ b/com32/Makefile
-@@ -20,3 +20,4 @@ modules: lib libutil gpllib
- rosh: lib libutil
+Index: syslinux-6.03/com32/Makefile
+===================================================================
+--- syslinux-6.03.orig/com32/Makefile
++++ syslinux-6.03/com32/Makefile
+@@ -21,3 +21,4 @@ rosh: lib libutil
samples: libutil elflink/ldlinux
- sysdump: libupload gpllib
+ sysdump: lib libutil libupload gpllib
+ lua/src: cmenu modules
+gpllib: lib
---
-1.7.9.5
-
diff --git a/meta/recipes-devtools/syslinux/files/syslinux-libupload-depend-lib.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
index c0714b5175..c0714b5175 100644
--- a/meta/recipes-devtools/syslinux/files/syslinux-libupload-depend-lib.patch
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch
diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
new file mode 100644
index 0000000000..7c003e165b
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/syslinux-remove-clean-script.patch
@@ -0,0 +1,17 @@
+This script try to call git submodule, since we are downloading
+the tarball it seems in-correct to do this.
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: syslinux-6.03/efi/Makefile
+===================================================================
+--- syslinux-6.03.orig/efi/Makefile
++++ syslinux-6.03/efi/Makefile
+@@ -101,7 +101,6 @@ tidy dist:
+ rm -f *.so *.o wrapper
+ find . \( -name \*.o -o -name \*.a -o -name .\*.d -o -name \*.tmp \) -print0 | \
+ xargs -0r rm -f
+- $(topdir)/efi/clean-gnu-efi.sh $(EFI_SUBARCH) $(objdir)
+
+ clean: tidy
+
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.01.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index 20afae95da..33dd776f1b 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.01.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -6,20 +6,25 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
# If you really want to run syslinux, you need mtools. We just want the
# ldlinux.* stuff for now, so skip mtools-native
-DEPENDS = "nasm-native util-linux"
+DEPENDS = "nasm-native util-linux e2fsprogs"
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.bz2 \
- file://0001-movebits-Add-SMT_TERMINAL-a-last-resort-region-type.patch \
- file://0002-memscan-build-a-linked-list-of-memory-scanners.patch \
- file://0003-PXELINUX-Add-bios-memscan-function.patch \
- file://0004-pxe-use-bios_fbm-and-real_base_mem-to-calculate-free.patch \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/6.xx/syslinux-${PV}.tar.xz \
file://syslinux-fix-parallel-building-issue.patch \
- file://isohybrid-fix-overflow-on-32-bit-system.patch \
file://syslinux-libupload-depend-lib.patch \
+ file://syslinux-remove-clean-script.patch \
+ file://0001-linux-syslinux-support-ext2-3-4-device.patch \
+ file://0002-linux-syslinux-implement-open_ext2_fs.patch \
+ file://0003-linux-syslinux-implement-install_to_ext2.patch \
+ file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \
+ file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \
+ file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \
+ file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \
+ file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \
+ file://0009-linux-syslinux-implement-install_bootblock.patch \
"
-SRC_URI[md5sum] = "6945ee89e29119d459baed4937bbc534"
-SRC_URI[sha256sum] = "83a04cf81e6a46b80ee5a321926eea095af3498b04317e3674b46c125c7a5b43"
+SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
+SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e"
COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
index 27f73f2ce2..73c0d25567 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.1.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.3.bb
@@ -24,8 +24,8 @@ SRC_URI = "${BASE_SRC_URI} \
file://alter-includedir.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "aae4b701ee527c6e4e1a6f9c7399882e"
-SRC_URI[sha256sum] = "16ee769248e64ba1cae6b4834fcc4e4edd7470d881410e8d58f7dd1434343514"
+SRC_URI[md5sum] = "db382feca91754b7f93da16dc4cdad1f"
+SRC_URI[sha256sum] = "6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005"
SRC_URI_class-native = "${BASE_SRC_URI}"
@@ -81,6 +81,7 @@ FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
# isn't getting picked up by shlibs code
RDEPENDS_${PN} += "tcl-lib"
RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/unifdef/files/unifdef.c b/meta/recipes-devtools/unifdef/files/unifdef.c
deleted file mode 100644
index 5cbac15608..0000000000
--- a/meta/recipes-devtools/unifdef/files/unifdef.c
+++ /dev/null
@@ -1,1005 +0,0 @@
-/*
- * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by Dave Yost.
- * It was rewritten to support ANSI C by Tony Finch. The original version of
- * unifdef carried the following copyright notice. None of its code remains
- * in this version (though some of the names remain).
- *
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-#ifndef lint
-#if 0
-static const char copyright[] =
-"@(#) Copyright (c) 1985, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif
-#ifdef __IDSTRING
-__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
-__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
-#endif
-#endif /* not lint */
-#ifdef __FBSDID
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
-#endif
-
-/*
- * unifdef - remove ifdef'ed lines
- *
- * Wishlist:
- * provide an option which will append the name of the
- * appropriate symbol after #else's and #endif's
- * provide an option which will check symbols after
- * #else's and #endif's to see that they match their
- * corresponding #ifdef or #ifndef
- *
- * The first two items above require better buffer handling, which would
- * also make it possible to handle all "dodgy" directives correctly.
- */
-
-#include <ctype.h>
-#include <err.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-size_t strlcpy(char *dst, const char *src, size_t siz);
-
-/* types of input lines: */
-typedef enum {
- LT_TRUEI, /* a true #if with ignore flag */
- LT_FALSEI, /* a false #if with ignore flag */
- LT_IF, /* an unknown #if */
- LT_TRUE, /* a true #if */
- LT_FALSE, /* a false #if */
- LT_ELIF, /* an unknown #elif */
- LT_ELTRUE, /* a true #elif */
- LT_ELFALSE, /* a false #elif */
- LT_ELSE, /* #else */
- LT_ENDIF, /* #endif */
- LT_DODGY, /* flag: directive is not on one line */
- LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
- LT_PLAIN, /* ordinary line */
- LT_EOF, /* end of file */
- LT_COUNT
-} Linetype;
-
-static char const * const linetype_name[] = {
- "TRUEI", "FALSEI", "IF", "TRUE", "FALSE",
- "ELIF", "ELTRUE", "ELFALSE", "ELSE", "ENDIF",
- "DODGY TRUEI", "DODGY FALSEI",
- "DODGY IF", "DODGY TRUE", "DODGY FALSE",
- "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
- "DODGY ELSE", "DODGY ENDIF",
- "PLAIN", "EOF"
-};
-
-/* state of #if processing */
-typedef enum {
- IS_OUTSIDE,
- IS_FALSE_PREFIX, /* false #if followed by false #elifs */
- IS_TRUE_PREFIX, /* first non-false #(el)if is true */
- IS_PASS_MIDDLE, /* first non-false #(el)if is unknown */
- IS_FALSE_MIDDLE, /* a false #elif after a pass state */
- IS_TRUE_MIDDLE, /* a true #elif after a pass state */
- IS_PASS_ELSE, /* an else after a pass state */
- IS_FALSE_ELSE, /* an else after a true state */
- IS_TRUE_ELSE, /* an else after only false states */
- IS_FALSE_TRAILER, /* #elifs after a true are false */
- IS_COUNT
-} Ifstate;
-
-static char const * const ifstate_name[] = {
- "OUTSIDE", "FALSE_PREFIX", "TRUE_PREFIX",
- "PASS_MIDDLE", "FALSE_MIDDLE", "TRUE_MIDDLE",
- "PASS_ELSE", "FALSE_ELSE", "TRUE_ELSE",
- "FALSE_TRAILER"
-};
-
-/* state of comment parser */
-typedef enum {
- NO_COMMENT = false, /* outside a comment */
- C_COMMENT, /* in a comment like this one */
- CXX_COMMENT, /* between // and end of line */
- STARTING_COMMENT, /* just after slash-backslash-newline */
- FINISHING_COMMENT, /* star-backslash-newline in a C comment */
- CHAR_LITERAL, /* inside '' */
- STRING_LITERAL /* inside "" */
-} Comment_state;
-
-static char const * const comment_name[] = {
- "NO", "C", "CXX", "STARTING", "FINISHING", "CHAR", "STRING"
-};
-
-/* state of preprocessor line parser */
-typedef enum {
- LS_START, /* only space and comments on this line */
- LS_HASH, /* only space, comments, and a hash */
- LS_DIRTY /* this line can't be a preprocessor line */
-} Line_state;
-
-static char const * const linestate_name[] = {
- "START", "HASH", "DIRTY"
-};
-
-/*
- * Minimum translation limits from ISO/IEC 9899:1999 5.2.4.1
- */
-#define MAXDEPTH 64 /* maximum #if nesting */
-#define MAXLINE 4096 /* maximum length of line */
-#define MAXSYMS 4096 /* maximum number of symbols */
-
-/*
- * Sometimes when editing a keyword the replacement text is longer, so
- * we leave some space at the end of the tline buffer to accommodate this.
- */
-#define EDITSLOP 10
-
-/*
- * Globals.
- */
-
-static bool complement; /* -c: do the complement */
-static bool debugging; /* -d: debugging reports */
-static bool iocccok; /* -e: fewer IOCCC errors */
-static bool killconsts; /* -k: eval constant #ifs */
-static bool lnblank; /* -l: blank deleted lines */
-static bool lnnum; /* -n: add #line directives */
-static bool symlist; /* -s: output symbol list */
-static bool text; /* -t: this is a text file */
-
-static const char *symname[MAXSYMS]; /* symbol name */
-static const char *value[MAXSYMS]; /* -Dsym=value */
-static bool ignore[MAXSYMS]; /* -iDsym or -iUsym */
-static int nsyms; /* number of symbols */
-
-static FILE *input; /* input file pointer */
-static const char *filename; /* input file name */
-static int linenum; /* current line number */
-
-static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
-static char *keyword; /* used for editing #elif's */
-
-static Comment_state incomment; /* comment parser state */
-static Line_state linestate; /* #if line parser state */
-static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
-static bool ignoring[MAXDEPTH]; /* ignore comments state */
-static int stifline[MAXDEPTH]; /* start of current #if */
-static int depth; /* current #if nesting */
-static int delcount; /* count of deleted lines */
-static bool keepthis; /* don't delete constant #if */
-
-static int exitstat; /* program exit status */
-
-static void addsym(bool, bool, char *);
-static void debug(const char *, ...);
-static void done(void);
-static void error(const char *);
-static int findsym(const char *);
-static void flushline(bool);
-static Linetype getline34(void);
-static Linetype ifeval(const char **);
-static void ignoreoff(void);
-static void ignoreon(void);
-static void keywordedit(const char *);
-static void nest(void);
-static void process(void);
-static const char *skipcomment(const char *);
-static const char *skipsym(const char *);
-static void state(Ifstate);
-static int strlcmp(const char *, const char *, size_t);
-static void unnest(void);
-static void usage(void);
-
-#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
-
-/*
- * The main program.
- */
-int
-main(int argc, char *argv[])
-{
- int opt;
-
- while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
- switch (opt) {
- case 'i': /* treat stuff controlled by these symbols as text */
- /*
- * For strict backwards-compatibility the U or D
- * should be immediately after the -i but it doesn't
- * matter much if we relax that requirement.
- */
- opt = *optarg++;
- if (opt == 'D')
- addsym(true, true, optarg);
- else if (opt == 'U')
- addsym(true, false, optarg);
- else
- usage();
- break;
- case 'D': /* define a symbol */
- addsym(false, true, optarg);
- break;
- case 'U': /* undef a symbol */
- addsym(false, false, optarg);
- break;
- case 'I':
- /* no-op for compatibility with cpp */
- break;
- case 'c': /* treat -D as -U and vice versa */
- complement = true;
- break;
- case 'd':
- debugging = true;
- break;
- case 'e': /* fewer errors from dodgy lines */
- iocccok = true;
- break;
- case 'k': /* process constant #ifs */
- killconsts = true;
- break;
- case 'l': /* blank deleted lines instead of omitting them */
- lnblank = true;
- break;
- case 'n': /* add #line directive after deleted lines */
- lnnum = true;
- break;
- case 's': /* only output list of symbols that control #ifs */
- symlist = true;
- break;
- case 't': /* don't parse C comments */
- text = true;
- break;
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
- if (argc > 1) {
- errx(2, "can only do one file");
- } else if (argc == 1 && strcmp(*argv, "-") != 0) {
- filename = *argv;
- input = fopen(filename, "r");
- if (input == NULL)
- err(2, "can't open %s", filename);
- } else {
- filename = "[stdin]";
- input = stdin;
- }
- process();
- abort(); /* bug */
-}
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
- " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
- exit(2);
-}
-
-/*
- * A state transition function alters the global #if processing state
- * in a particular way. The table below is indexed by the current
- * processing state and the type of the current line.
- *
- * Nesting is handled by keeping a stack of states; some transition
- * functions increase or decrease the depth. They also maintain the
- * ignore state on a stack. In some complicated cases they have to
- * alter the preprocessor directive, as follows.
- *
- * When we have processed a group that starts off with a known-false
- * #if/#elif sequence (which has therefore been deleted) followed by a
- * #elif that we don't understand and therefore must keep, we edit the
- * latter into a #if to keep the nesting correct.
- *
- * When we find a true #elif in a group, the following block will
- * always be kept and the rest of the sequence after the next #elif or
- * #else will be discarded. We edit the #elif into a #else and the
- * following directive to #endif since this has the desired behaviour.
- *
- * "Dodgy" directives are split across multiple lines, the most common
- * example being a multi-line comment hanging off the right of the
- * directive. We can handle them correctly only if there is no change
- * from printing to dropping (or vice versa) caused by that directive.
- * If the directive is the first of a group we have a choice between
- * failing with an error, or passing it through unchanged instead of
- * evaluating it. The latter is not the default to avoid questions from
- * users about unifdef unexpectedly leaving behind preprocessor directives.
- */
-typedef void state_fn(void);
-
-/* report an error */
-static void Eelif (void) { error("Inappropriate #elif"); }
-static void Eelse (void) { error("Inappropriate #else"); }
-static void Eendif(void) { error("Inappropriate #endif"); }
-static void Eeof (void) { error("Premature EOF"); }
-static void Eioccc(void) { error("Obfuscated preprocessor control line"); }
-/* plain line handling */
-static void print (void) { flushline(true); }
-static void drop (void) { flushline(false); }
-/* output lacks group's start line */
-static void Strue (void) { drop(); ignoreoff(); state(IS_TRUE_PREFIX); }
-static void Sfalse(void) { drop(); ignoreoff(); state(IS_FALSE_PREFIX); }
-static void Selse (void) { drop(); state(IS_TRUE_ELSE); }
-/* print/pass this block */
-static void Pelif (void) { print(); ignoreoff(); state(IS_PASS_MIDDLE); }
-static void Pelse (void) { print(); state(IS_PASS_ELSE); }
-static void Pendif(void) { print(); unnest(); }
-/* discard this block */
-static void Dfalse(void) { drop(); ignoreoff(); state(IS_FALSE_TRAILER); }
-static void Delif (void) { drop(); ignoreoff(); state(IS_FALSE_MIDDLE); }
-static void Delse (void) { drop(); state(IS_FALSE_ELSE); }
-static void Dendif(void) { drop(); unnest(); }
-/* first line of group */
-static void Fdrop (void) { nest(); Dfalse(); }
-static void Fpass (void) { nest(); Pelif(); }
-static void Ftrue (void) { nest(); Strue(); }
-static void Ffalse(void) { nest(); Sfalse(); }
-/* variable pedantry for obfuscated lines */
-static void Oiffy (void) { if (!iocccok) Eioccc(); Fpass(); ignoreon(); }
-static void Oif (void) { if (!iocccok) Eioccc(); Fpass(); }
-static void Oelif (void) { if (!iocccok) Eioccc(); Pelif(); }
-/* ignore comments in this block */
-static void Idrop (void) { Fdrop(); ignoreon(); }
-static void Itrue (void) { Ftrue(); ignoreon(); }
-static void Ifalse(void) { Ffalse(); ignoreon(); }
-/* edit this line */
-static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
-static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
-static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
-static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
-
-static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
-/* IS_OUTSIDE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
- print, done },
-/* IS_FALSE_PREFIX */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_PREFIX */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- print, Eeof },
-/* IS_PASS_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
- print, Eeof },
-/* IS_FALSE_MIDDLE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
- drop, Eeof },
-/* IS_TRUE_MIDDLE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
- print, Eeof },
-/* IS_PASS_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
- print, Eeof },
-/* IS_FALSE_ELSE */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
- drop, Eeof },
-/* IS_TRUE_ELSE */
-{ Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
- Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
- print, Eeof },
-/* IS_FALSE_TRAILER */
-{ Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
- Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
- drop, Eeof }
-/*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
- TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
- PLAIN EOF */
-};
-
-/*
- * State machine utility functions
- */
-static void
-done(void)
-{
- if (incomment)
- error("EOF in comment");
- exit(exitstat);
-}
-static void
-ignoreoff(void)
-{
- if (depth == 0)
- abort(); /* bug */
- ignoring[depth] = ignoring[depth-1];
-}
-static void
-ignoreon(void)
-{
- ignoring[depth] = true;
-}
-static void
-keywordedit(const char *replacement)
-{
- size_t size = tline + sizeof(tline) - keyword;
- char *dst = keyword;
- const char *src = replacement;
- if (size != 0) {
- while ((--size != 0) && (*src != '\0'))
- *dst++ = *src++;
- *dst = '\0';
- }
- print();
-}
-static void
-nest(void)
-{
- depth += 1;
- if (depth >= MAXDEPTH)
- error("Too many levels of nesting");
- stifline[depth] = linenum;
-}
-static void
-unnest(void)
-{
- if (depth == 0)
- abort(); /* bug */
- depth -= 1;
-}
-static void
-state(Ifstate is)
-{
- ifstate[depth] = is;
-}
-
-/*
- * Write a line to the output or not, according to command line options.
- */
-static void
-flushline(bool keep)
-{
- if (symlist)
- return;
- if (keep ^ complement) {
- if (lnnum && delcount > 0)
- printf("#line %d\n", linenum);
- fputs(tline, stdout);
- delcount = 0;
- } else {
- if (lnblank)
- putc('\n', stdout);
- exitstat = 1;
- delcount += 1;
- }
-}
-
-/*
- * The driver for the state machine.
- */
-static void
-process(void)
-{
- Linetype lineval;
-
- for (;;) {
- linenum++;
- lineval = getline34();
- trans_table[ifstate[depth]][lineval]();
- debug("process %s -> %s depth %d",
- linetype_name[lineval],
- ifstate_name[ifstate[depth]], depth);
- }
-}
-
-/*
- * Parse a line and determine its type. We keep the preprocessor line
- * parser state between calls in the global variable linestate, with
- * help from skipcomment().
- */
-static Linetype
-getline34(void)
-{
- const char *cp;
- int cursym;
- int kwlen;
- Linetype retval;
- Comment_state wascomment;
-
- if (fgets(tline, MAXLINE, input) == NULL)
- return (LT_EOF);
- retval = LT_PLAIN;
- wascomment = incomment;
- cp = skipcomment(tline);
- if (linestate == LS_START) {
- if (*cp == '#') {
- linestate = LS_HASH;
- cp = skipcomment(cp + 1);
- } else if (*cp != '\0')
- linestate = LS_DIRTY;
- }
- if (!incomment && linestate == LS_HASH) {
- keyword = tline + (cp - tline);
- cp = skipsym(cp);
- kwlen = cp - keyword;
- /* no way can we deal with a continuation inside a keyword */
- if (strncmp(cp, "\\\n", 2) == 0)
- Eioccc();
- if (strlcmp("ifdef", keyword, kwlen) == 0 ||
- strlcmp("ifndef", keyword, kwlen) == 0) {
- cp = skipcomment(cp);
- if ((cursym = findsym(cp)) < 0)
- retval = LT_IF;
- else {
- retval = (keyword[2] == 'n')
- ? LT_FALSE : LT_TRUE;
- if (value[cursym] == NULL)
- retval = (retval == LT_TRUE)
- ? LT_FALSE : LT_TRUE;
- if (ignore[cursym])
- retval = (retval == LT_TRUE)
- ? LT_TRUEI : LT_FALSEI;
- }
- cp = skipsym(cp);
- } else if (strlcmp("if", keyword, kwlen) == 0)
- retval = ifeval(&cp);
- else if (strlcmp("elif", keyword, kwlen) == 0)
- retval = ifeval(&cp) - LT_IF + LT_ELIF;
- else if (strlcmp("else", keyword, kwlen) == 0)
- retval = LT_ELSE;
- else if (strlcmp("endif", keyword, kwlen) == 0)
- retval = LT_ENDIF;
- else {
- linestate = LS_DIRTY;
- retval = LT_PLAIN;
- }
- cp = skipcomment(cp);
- if (*cp != '\0') {
- linestate = LS_DIRTY;
- if (retval == LT_TRUE || retval == LT_FALSE ||
- retval == LT_TRUEI || retval == LT_FALSEI)
- retval = LT_IF;
- if (retval == LT_ELTRUE || retval == LT_ELFALSE)
- retval = LT_ELIF;
- }
- if (retval != LT_PLAIN && (wascomment || incomment)) {
- retval += LT_DODGY;
- if (incomment)
- linestate = LS_DIRTY;
- }
- /* skipcomment should have changed the state */
- if (linestate == LS_HASH)
- abort(); /* bug */
- }
- if (linestate == LS_DIRTY) {
- while (*cp != '\0')
- cp = skipcomment(cp + 1);
- }
- debug("parser %s comment %s line",
- comment_name[incomment], linestate_name[linestate]);
- return (retval);
-}
-
-/*
- * These are the binary operators that are supported by the expression
- * evaluator. Note that if support for division is added then we also
- * need short-circuiting booleans because of divide-by-zero.
- */
-static int op_lt(int a, int b) { return (a < b); }
-static int op_gt(int a, int b) { return (a > b); }
-static int op_le(int a, int b) { return (a <= b); }
-static int op_ge(int a, int b) { return (a >= b); }
-static int op_eq(int a, int b) { return (a == b); }
-static int op_ne(int a, int b) { return (a != b); }
-static int op_or(int a, int b) { return (a || b); }
-static int op_and(int a, int b) { return (a && b); }
-
-/*
- * An evaluation function takes three arguments, as follows: (1) a pointer to
- * an element of the precedence table which lists the operators at the current
- * level of precedence; (2) a pointer to an integer which will receive the
- * value of the expression; and (3) a pointer to a char* that points to the
- * expression to be evaluated and that is updated to the end of the expression
- * when evaluation is complete. The function returns LT_FALSE if the value of
- * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
- * expression could not be evaluated.
- */
-struct ops;
-
-typedef Linetype eval_fn(const struct ops *, int *, const char **);
-
-static eval_fn eval_table, eval_unary;
-
-/*
- * The precedence table. Expressions involving binary operators are evaluated
- * in a table-driven way by eval_table. When it evaluates a subexpression it
- * calls the inner function with its first argument pointing to the next
- * element of the table. Innermost expressions have special non-table-driven
- * handling.
- */
-static const struct ops {
- eval_fn *inner;
- struct op {
- const char *str;
- int (*fn)(int, int);
- } op[5];
-} eval_ops[] = {
- { eval_table, { { "||", op_or } } },
- { eval_table, { { "&&", op_and } } },
- { eval_table, { { "==", op_eq },
- { "!=", op_ne } } },
- { eval_unary, { { "<=", op_le },
- { ">=", op_ge },
- { "<", op_lt },
- { ">", op_gt } } }
-};
-
-/*
- * Function for evaluating the innermost parts of expressions,
- * viz. !expr (expr) defined(symbol) symbol number
- * We reset the keepthis flag when we find a non-constant subexpression.
- */
-static Linetype
-eval_unary(const struct ops *ops, int *valp, const char **cpp)
-{
- const char *cp;
- char *ep;
- int sym;
-
- cp = skipcomment(*cpp);
- if (*cp == '!') {
- debug("eval%d !", ops - eval_ops);
- cp++;
- if (eval_unary(ops, valp, &cp) == LT_IF)
- return (LT_IF);
- *valp = !*valp;
- } else if (*cp == '(') {
- cp++;
- debug("eval%d (", ops - eval_ops);
- if (eval_table(eval_ops, valp, &cp) == LT_IF)
- return (LT_IF);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- } else if (isdigit((unsigned char)*cp)) {
- debug("eval%d number", ops - eval_ops);
- *valp = strtol(cp, &ep, 0);
- cp = skipsym(cp);
- } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
- cp = skipcomment(cp+7);
- debug("eval%d defined", ops - eval_ops);
- if (*cp++ != '(')
- return (LT_IF);
- cp = skipcomment(cp);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- *valp = (value[sym] != NULL);
- cp = skipsym(cp);
- cp = skipcomment(cp);
- if (*cp++ != ')')
- return (LT_IF);
- keepthis = false;
- } else if (!endsym(*cp)) {
- debug("eval%d symbol", ops - eval_ops);
- sym = findsym(cp);
- if (sym < 0)
- return (LT_IF);
- if (value[sym] == NULL)
- *valp = 0;
- else {
- *valp = strtol(value[sym], &ep, 0);
- if (*ep != '\0' || ep == value[sym])
- return (LT_IF);
- }
- cp = skipsym(cp);
- keepthis = false;
- } else {
- debug("eval%d bad expr", ops - eval_ops);
- return (LT_IF);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Table-driven evaluation of binary operators.
- */
-static Linetype
-eval_table(const struct ops *ops, int *valp, const char **cpp)
-{
- const struct op *op;
- const char *cp;
- int val;
-
- debug("eval%d", ops - eval_ops);
- cp = *cpp;
- if (ops->inner(ops+1, valp, &cp) == LT_IF)
- return (LT_IF);
- for (;;) {
- cp = skipcomment(cp);
- for (op = ops->op; op->str != NULL; op++)
- if (strncmp(cp, op->str, strlen(op->str)) == 0)
- break;
- if (op->str == NULL)
- break;
- cp += strlen(op->str);
- debug("eval%d %s", ops - eval_ops, op->str);
- if (ops->inner(ops+1, &val, &cp) == LT_IF)
- return (LT_IF);
- *valp = op->fn(*valp, val);
- }
-
- *cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
- return (*valp ? LT_TRUE : LT_FALSE);
-}
-
-/*
- * Evaluate the expression on a #if or #elif line. If we can work out
- * the result we return LT_TRUE or LT_FALSE accordingly, otherwise we
- * return just a generic LT_IF.
- */
-static Linetype
-ifeval(const char **cpp)
-{
- int ret;
- int val;
-
- debug("eval %s", *cpp);
- keepthis = killconsts ? false : true;
- ret = eval_table(eval_ops, &val, cpp);
- debug("eval = %d", val);
- return (keepthis ? LT_IF : ret);
-}
-
-/*
- * Skip over comments, strings, and character literals and stop at the
- * next character position that is not whitespace. Between calls we keep
- * the comment state in the global variable incomment, and we also adjust
- * the global variable linestate when we see a newline.
- * XXX: doesn't cope with the buffer splitting inside a state transition.
- */
-static const char *
-skipcomment(const char *cp)
-{
- if (text || ignoring[depth]) {
- for (; isspace((unsigned char)*cp); cp++)
- if (*cp == '\n')
- linestate = LS_START;
- return (cp);
- }
- while (*cp != '\0')
- /* don't reset to LS_START after a line continuation */
- if (strncmp(cp, "\\\n", 2) == 0)
- cp += 2;
- else switch (incomment) {
- case NO_COMMENT:
- if (strncmp(cp, "/\\\n", 3) == 0) {
- incomment = STARTING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "/*", 2) == 0) {
- incomment = C_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "//", 2) == 0) {
- incomment = CXX_COMMENT;
- cp += 2;
- } else if (strncmp(cp, "\'", 1) == 0) {
- incomment = CHAR_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\"", 1) == 0) {
- incomment = STRING_LITERAL;
- linestate = LS_DIRTY;
- cp += 1;
- } else if (strncmp(cp, "\n", 1) == 0) {
- linestate = LS_START;
- cp += 1;
- } else if (strchr(" \t", *cp) != NULL) {
- cp += 1;
- } else
- return (cp);
- continue;
- case CXX_COMMENT:
- if (strncmp(cp, "\n", 1) == 0) {
- incomment = NO_COMMENT;
- linestate = LS_START;
- }
- cp += 1;
- continue;
- case CHAR_LITERAL:
- case STRING_LITERAL:
- if ((incomment == CHAR_LITERAL && cp[0] == '\'') ||
- (incomment == STRING_LITERAL && cp[0] == '\"')) {
- incomment = NO_COMMENT;
- cp += 1;
- } else if (cp[0] == '\\') {
- if (cp[1] == '\0')
- cp += 1;
- else
- cp += 2;
- } else if (strncmp(cp, "\n", 1) == 0) {
- if (incomment == CHAR_LITERAL)
- error("unterminated char literal");
- else
- error("unterminated string literal");
- } else
- cp += 1;
- continue;
- case C_COMMENT:
- if (strncmp(cp, "*\\\n", 3) == 0) {
- incomment = FINISHING_COMMENT;
- cp += 3;
- } else if (strncmp(cp, "*/", 2) == 0) {
- incomment = NO_COMMENT;
- cp += 2;
- } else
- cp += 1;
- continue;
- case STARTING_COMMENT:
- if (*cp == '*') {
- incomment = C_COMMENT;
- cp += 1;
- } else if (*cp == '/') {
- incomment = CXX_COMMENT;
- cp += 1;
- } else {
- incomment = NO_COMMENT;
- linestate = LS_DIRTY;
- }
- continue;
- case FINISHING_COMMENT:
- if (*cp == '/') {
- incomment = NO_COMMENT;
- cp += 1;
- } else
- incomment = C_COMMENT;
- continue;
- default:
- abort(); /* bug */
- }
- return (cp);
-}
-
-/*
- * Skip over an identifier.
- */
-static const char *
-skipsym(const char *cp)
-{
- while (!endsym(*cp))
- ++cp;
- return (cp);
-}
-
-/*
- * Look for the symbol in the symbol table. If is is found, we return
- * the symbol table index, else we return -1.
- */
-static int
-findsym(const char *str)
-{
- const char *cp;
- int symind;
-
- cp = skipsym(str);
- if (cp == str)
- return (-1);
- if (symlist) {
- printf("%.*s\n", (int)(cp-str), str);
- /* we don't care about the value of the symbol */
- return (0);
- }
- for (symind = 0; symind < nsyms; ++symind) {
- if (strlcmp(symname[symind], str, cp-str) == 0) {
- debug("findsym %s %s", symname[symind],
- value[symind] ? value[symind] : "");
- return (symind);
- }
- }
- return (-1);
-}
-
-/*
- * Add a symbol to the symbol table.
- */
-static void
-addsym(bool ignorethis, bool definethis, char *sym)
-{
- int symind;
- char *val;
-
- symind = findsym(sym);
- if (symind < 0) {
- if (nsyms >= MAXSYMS)
- errx(2, "too many symbols");
- symind = nsyms++;
- }
- symname[symind] = sym;
- ignore[symind] = ignorethis;
- val = sym + (skipsym(sym) - sym);
- if (definethis) {
- if (*val == '=') {
- value[symind] = val+1;
- *val = '\0';
- } else if (*val == '\0')
- value[symind] = "";
- else
- usage();
- } else {
- if (*val != '\0')
- usage();
- value[symind] = NULL;
- }
-}
-
-/*
- * Compare s with n characters of t.
- * The same as strncmp() except that it checks that s[n] == '\0'.
- */
-static int
-strlcmp(const char *s, const char *t, size_t n)
-{
- while (n-- && *t != '\0')
- if (*s != *t)
- return ((unsigned char)*s - (unsigned char)*t);
- else
- ++s, ++t;
- return ((unsigned char)*s);
-}
-
-/*
- * Diagnostics.
- */
-static void
-debug(const char *msg, ...)
-{
- va_list ap;
-
- if (debugging) {
- va_start(ap, msg);
- vwarnx(msg, ap);
- va_end(ap);
- }
-}
-
-static void
-error(const char *msg)
-{
- if (depth == 0)
- warnx("%s: %d: %s", filename, linenum, msg);
- else
- warnx("%s: %d: %s (#if line %d depth %d)",
- filename, linenum, msg, stifline[depth], depth);
- errx(2, "output may be truncated");
-}
diff --git a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb b/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
deleted file mode 100644
index 9a28684236..0000000000
--- a/meta/recipes-devtools/unifdef/unifdef-native_2.6.18+git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Kernel header preprocessor"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-
-PR = "r1"
-
-LIC_FILES_CHKSUM = "file://${WORKDIR}/unifdef.c;endline=32;md5=1a33f5c39aa718a89058721df61979bd"
-
-SRC_URI = "file://unifdef.c"
-
-inherit native
-
-do_compile() {
- ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef ${WORKDIR}/unifdef.c
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 unifdef ${D}${bindir}
-}
-
diff --git a/meta/recipes-devtools/unifdef/unifdef_2.10.bb b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
new file mode 100644
index 0000000000..b8a0079840
--- /dev/null
+++ b/meta/recipes-devtools/unifdef/unifdef_2.10.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Selectively remove #ifdef statements from sources"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+
+LIC_FILES_CHKSUM = "file://unifdef.c;endline=32;md5=2cc23f0382a6f560f6a9ecf4e040c0da"
+
+SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "bb5d895e5ebbba5c5cc0c2771cf97ebe"
+SRC_URI[sha256sum] = "3b9b2b6b1952e9b9c1b9f734edec270689a35bdbf33ae66b50e19b2ed0d2df06"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} prefix=${prefix}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 64e7daffe1..63056fde4c 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -7,14 +7,12 @@ BBCLASSEXTEND = "native"
HOMEPAGE = "http://vala-project.org"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-INC_PR = "r1"
SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF = "--disable-vapigen"
+inherit autotools pkgconfig
+FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
FILES_${PN}-doc += "${datadir}/devhelp"
-FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi"
+FILES_${PN}-dbg += "${libdir}/${BPN}-${SHRT_VER}/.debug"
diff --git a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
index e6c7941a77..ac9dc8c83a 100644
--- a/meta/recipes-devtools/vala/vala-0.16.0/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
+++ b/meta/recipes-devtools/vala/vala/0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch
@@ -7,6 +7,8 @@ Subject: [PATCH] git-version-gen: don't append -dirty if we're not in git
* for example if we have some dirty directory and we unpack clean vala tarball in it, then it will append -dirty
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Inappropriate [OE-Specific]
---
build-aux/git-version-gen | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/meta/recipes-devtools/vala/vala_0.16.0.bb b/meta/recipes-devtools/vala/vala_0.16.0.bb
deleted file mode 100644
index 92120b4a36..0000000000
--- a/meta/recipes-devtools/vala/vala_0.16.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-PR = "${INC_PR}.1"
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
-
-SRC_URI[md5sum] = "84b742e9cca4c90fde3026c3793c03c1"
-SRC_URI[sha256sum] = "3adb37aa2b35e2e2daed47552e85dbcbf752c0f7768b269d856993620073a657"
diff --git a/meta/recipes-devtools/vala/vala_0.26.1.bb b/meta/recipes-devtools/vala/vala_0.26.1.bb
new file mode 100644
index 0000000000..3df9cd4bae
--- /dev/null
+++ b/meta/recipes-devtools/vala/vala_0.26.1.bb
@@ -0,0 +1,6 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
+
+SRC_URI[md5sum] = "723a03b822d4cc47abc4019685970a3e"
+SRC_URI[sha256sum] = "8407abb19ab3a58bbfc0d288abb47666ef81f76d0540258c03965e7545f59e6b"
diff --git a/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch b/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
new file mode 100644
index 0000000000..300f2f19fa
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
@@ -0,0 +1,37 @@
+Enable building valgrind on host with 4.x kernel.
+
+For OpenEmbedded builds we should be checking something like
+OLDEST_KERNEL instead of `uname -r`, but this is good enough for now.
+
+Building on 4.x* currently fails with:
+ configure:5556: checking for the kernel version
+ configure:5579: result: unsupported (4.0.0-rc3-00111-gaffb817)
+ configure:5581: error: Valgrind works on kernels 2.4, 2.6
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- valgrind-3.9.0/configure.ac.orig 2015-03-13 19:17:01.247310868 +0100
++++ valgrind-3.9.0/configure.ac 2015-03-13 19:19:27.388316108 +0100
+@@ -276,9 +276,9 @@
+ kernel=`uname -r`
+
+ case "${kernel}" in
+- 2.6.*|3.*)
+- AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
++ 2.6.*|3.*|4.*)
++ AC_MSG_RESULT([2.6.x/3.x/4.x family (${kernel})])
++ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x or Linux 4.x])
+ ;;
+
+ 2.4.*)
+@@ -288,7 +288,7 @@
+
+ *)
+ AC_MSG_RESULT([unsupported (${kernel})])
+- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
++ AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6, 3.x, 4.x])
+ ;;
+ esac
+
diff --git a/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch b/meta/recipes-devtools/valgrind/valgrind/glibc.patch
index fab4044d17..8b902ddbff 100644
--- a/meta/recipes-devtools/valgrind/valgrind/glibc-2.20.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/glibc.patch
@@ -1,4 +1,4 @@
-Backport of glibc 2.19 and 2.20 support.
+Backport of glibc 2.19 and 2.20 and 2.21 support.
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
@@ -7,7 +7,7 @@ diff --git a/configure.ac b/configure.ac
index 229ab98..1c18108 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -918,6 +918,20 @@ case "${GLIBC_VERSION}" in
+@@ -918,6 +918,27 @@ case "${GLIBC_VERSION}" in
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
@@ -25,6 +25,13 @@ index 229ab98..1c18108 100644
+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.21)
++ AC_MSG_RESULT(2.21 family)
++ AC_DEFINE([GLIBC_2_21], 1, [Define to 1 if you're using glibc 2.21.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
darwin)
AC_MSG_RESULT(Darwin)
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch b/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
deleted file mode 100644
index 12ad4c3f90..0000000000
--- a/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-status: Backport
-
-r14566 | florian | 2014-09-24 17:02:54 -0500 (Wed, 24 Sep 2014) | 4 lines
-
-The testbuckets none/tests/ppc{32,64} did not build in case the
-toolchain did not support -maltivec -mabi=altivec.
-This should work now. Fixes BZ #338731
-
-Index: none/tests/ppc32/Makefile.am
-===================================================================
---- a/none/tests/ppc32/Makefile.am (revision 14565)
-+++ b/none/tests/ppc32/Makefile.am (revision 14566)
-@@ -72,8 +72,12 @@
- allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
-
- if HAS_ALTIVEC
-+BUILD_FLAG_ALTIVEC = -maltivec
-+BUILD_FLAG_ABI_ALTIVEC = -mabi=altivec
- ALTIVEC_FLAG = -DHAS_ALTIVEC
- else
-+BUILD_FLAG_ALTIVEC =
-+BUILD_FLAG_ABI_ALTIVEC =
- ALTIVEC_FLAG =
- endif
-
-@@ -101,11 +105,12 @@
- ISA_2_07_FLAG =
- endif
-
--jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \
-- @FLAG_M32@ $(ALTIVEC_FLAG)
-+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \
-+ @FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
-
--testVMX_CFLAGS = $(AM_CFLAGS) -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \
-- -DGCC_COMPILER @FLAG_M32@
-+testVMX_CFLAGS = $(AM_CFLAGS) -O -g -Wall -DALTIVEC \
-+ -DGCC_COMPILER @FLAG_M32@ $(BUILD_FLAG_ALTIVEC) \
-+ $(BUILD_FLAG_ABI_ALTIVEC)
-
- test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \
- @FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
-Index: none/tests/ppc64/Makefile.am
-===================================================================
---- a/none/tests/ppc64/Makefile.am (revision 14565)
-+++ b/none/tests/ppc64/Makefile.am (revision 14566)
-@@ -50,8 +50,10 @@
- allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
-
- if HAS_ALTIVEC
-+BUILD_FLAG_ALTIVEC = -maltivec
- ALTIVEC_FLAG = -DHAS_ALTIVEC
- else
-+BUILD_FLAG_ALTIVEC =
- ALTIVEC_FLAG =
- endif
-
-@@ -88,8 +90,8 @@
- test_isa_2_06_part3_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \
- @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
-
--jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \
-- @FLAG_M64@ $(ALTIVEC_FLAG)
-+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \
-+ @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
-
- test_dfp1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(DFP_FLAG) \
- @FLAG_M64@ $(BUILD_FLAGS_DFP)
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
index 46dea60eb3..f84bf9ae9a 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
@@ -8,13 +8,13 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
-index 2a19f5b..ccdeb77 100644
---- a/none/tests/arm/Makefile.am
-+++ b/none/tests/arm/Makefile.am
-@@ -16,15 +16,16 @@ EXTRA_DIST = \
- vcvt_fixed_float_VFP.vgtest \
- vfp.stdout.exp vfp.stderr.exp vfp.vgtest
+Index: valgrind-3.10.0/none/tests/arm/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/arm/Makefile.am
++++ valgrind-3.10.0/none/tests/arm/Makefile.am
+@@ -17,15 +17,16 @@ EXTRA_DIST = \
+ vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
+ vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
+# For yocto:
+# Only include tests that don't require Thumb.
@@ -31,8 +31,8 @@ index 2a19f5b..ccdeb77 100644
- v6intThumb \
v6media \
vcvt_fixed_float_VFP \
- vfp
-@@ -34,32 +35,3 @@ AM_CXXFLAGS += @FLAG_M32@
+ vfp \
+@@ -36,34 +37,3 @@ AM_CXXFLAGS += @FLAG_M32@
AM_CCASFLAGS += @FLAG_M32@
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
@@ -65,3 +65,5 @@ index 2a19f5b..ccdeb77 100644
-intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
-ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
-ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+-
+-vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
index 2a14e1852c..1c640ffb71 100644
--- a/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
+++ b/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
@@ -36,10 +36,10 @@ Upstream-Status: Pending
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
-index bd70eea..1436e8e 100644
---- a/memcheck/tests/ppc32/Makefile.am
-+++ b/memcheck/tests/ppc32/Makefile.am
+Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
@@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \
power_ISA2_05.stdout.exp_Without_FPPO
@@ -50,11 +50,11 @@ index bd70eea..1436e8e 100644
power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
-I$(top_srcdir)/include @FLAG_M32@
-diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am
-index 4f581b6..91ce7e7 100644
---- a/none/tests/ppc32/Makefile.am
-+++ b/none/tests/ppc32/Makefile.am
-@@ -50,16 +50,8 @@ check_PROGRAMS = \
+Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am
++++ valgrind-3.10.0/none/tests/ppc32/Makefile.am
+@@ -52,16 +52,8 @@ check_PROGRAMS = \
allexec \
bug129390-ppc32 \
bug139050-ppc32 \
@@ -67,9 +67,9 @@ index 4f581b6..91ce7e7 100644
- test_isa_2_07_part1 \
- test_isa_2_07_part2 \
- test_tm \
-- test_touch_tm
+- test_touch_tm \
+ ldstrev lsw mftocrf mcrfs test_fx test_gx \
-+ twi tw xlc_dbl_u32 power6_bcmp
++ twi tw xlc_dbl_u32 power6_bcmp \
+ ldst_multiple \
+ data-cache-instructions
- AM_CFLAGS += @FLAG_M32@
- AM_CXXFLAGS += @FLAG_M32@
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
new file mode 100644
index 0000000000..07a272633e
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
@@ -0,0 +1,25 @@
+
+Upstream-Status: Inapporpiate [embedded config]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: valgrind-3.10.0/none/tests/Makefile.am
+===================================================================
+--- valgrind-3.10.0.orig/none/tests/Makefile.am
++++ valgrind-3.10.0/none/tests/Makefile.am
+@@ -280,7 +280,6 @@ threaded_fork_LDADD = -lpthread
+ threadederrno_LDADD = -lpthread
+ tls_SOURCES = tls.c tls2.c
+ tls_DEPENDENCIES = tls.so tls2.so
+-tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests
+ tls_LDADD = tls.so tls2.so -lpthread
+ tls_so_SOURCES = tls_so.c
+ tls_so_DEPENDENCIES = tls2.so
+@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN
+ tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic
+ tls_so_LDADD = `pwd`/tls2.so
+ else
+- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
++ tls_so_LDFLAGS = -shared -fPIC
+ tls_so_LDADD = tls2.so
+ endif
+ tls_so_CFLAGS = $(AM_CFLAGS) -fPIC
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
index eea81a2405..bf80b165af 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.9.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
@@ -8,26 +8,28 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
X11DEPENDS = "virtual/libx11"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
-PR = "r8"
+DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
+ "
SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://fixed-perl-path.patch \
file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
file://sepbuildfix.patch \
- file://glibc-2.20.patch \
+ file://glibc.patch \
file://force-nostabs.patch \
file://remove-arm-variant-specific.patch \
file://remove-ppc-tests-failing-build.patch \
+ file://valgrind-remove-rpath.patch \
+ file://enable.building.on.4.x.kernel.patch \
file://add-ptest.patch \
- file://pass-maltivec-only-if-it-supported.patch \
file://run-ptest \
"
-SRC_URI[md5sum] = "0947de8112f946b9ce64764af7be6df2"
-SRC_URI[sha256sum] = "e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0"
+SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"
+SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997"
-COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
+COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux'
COMPATIBLE_HOST_armv7a = 'arm.*-linux'
inherit autotools ptest
@@ -35,7 +37,6 @@ inherit autotools ptest
EXTRA_OECONF = "--enable-tls --without-mpicc"
EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
EXTRA_OEMAKE = "-w"
-PARALLEL_MAKE = ""
do_install_append () {
install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
@@ -49,7 +50,7 @@ FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
# redirect functions like strlen.
RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-RDEPENDS_${PN}-ptest += " sed perl glibc-utils"
+RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
do_compile_ptest() {
oe_runmake check
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.25/obsolete_automake_macros.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.25/obsolete_automake_macros.patch
deleted file mode 100644
index faa8acce89..0000000000
--- a/meta/recipes-devtools/xmlto/xmlto-0.0.25/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nurd xmlto-0.0.25/configure.in xmlto-0.0.25/configure.in
---- xmlto-0.0.25/configure.in 2011-12-01 17:49:00.000000000 +0200
-+++ xmlto-0.0.25/configure.in 2013-01-07 05:24:16.169953519 +0200
-@@ -1,7 +1,7 @@
- AC_INIT(xmlto, 0.0.25)
- AC_CONFIG_SRCDIR(xmlto.spec.in)
- AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects 1.6])
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- AC_PROG_CC
- AM_PROG_CC_C_O
diff --git a/meta/recipes-devtools/xmlto/xmlto-0.0.25/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
index 69ca43221c..69ca43221c 100644
--- a/meta/recipes-devtools/xmlto/xmlto-0.0.25/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
+++ b/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.25.bb b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
index 2698b1c258..a7a01830ae 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.25.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
@@ -6,12 +6,11 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
SRC_URI = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-${PV}.tar.gz \
- file://obsolete_automake_macros.patch \
file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
file://catalog.xml \
"
-SRC_URI[md5sum] = "a88cd3f08789b4825d1ac89fa065170d"
-SRC_URI[sha256sum] = "c52b56d929e8d20fc19cd3b7ec238f8d039730c56ee311cc352e843147e3e31a"
+SRC_URI[md5sum] = "0cca8be787ba01e00c618cb390c988b9"
+SRC_URI[sha256sum] = "cfd8d2a26077be1d5566dfe22dd66099ae4f4600dea97d6e113a2cc5b8708977"
inherit autotools
@@ -36,3 +35,4 @@ do_install_append() {
create_wrapper ${D}/${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
}
+do_populate_sysroot[rdeptask] = "do_populate_sysroot"